What is snake case?

PHP: What is snake case?

Snake case is the way of writing words/phrases, where each word is separated by an underscore character. It is often used for variable names. For example $blog_posts is in snake case. Sometimes it is written as snake_case.

See also Camel case (e.g. $camelCaseVariable)

webdevetc profile pic
webdevetc

I am a 29 year old backend web developer from London, mostly focusing on PHP and Laravel lately. This (webdevetc.com) is my blog where I write about some web development topics (PHP, Laravel, Javascript, and some server stuff). contact me here.



More...


Comments and discussion about What is snake case?

Found this interesting? Maybe you want to read some more in this series?

Or see other topics in the PHP language

Or see other languages/frameworks:
PHP Laravel Composer Apache CentOS and Linux Stuff WordPress General Webdev and Programming Stuff JavaScript
Or see random questions

What are generators in PHP, and how do they compare to arrays?

How do you launch the PHP interactive shell?

What is the max size, by default, of GET variables?

How to use subdomains as parameters in your routes (or in your web.php file)

What does 'final class' and 'final function' (final method) mean in PHP?

How to make multiple routes share the same URL structure or URL parameters

How to force gzip compression in Apache with .htaccess

How to sort an array of dates and times?

How to convert a string to an array of it's characters in PHP?

How to block access to certain referrers in Apache using .htaccess