Is there a preferred way to name variables in PHP?

I'm new to PHP and I was wondering if there is a standard convention for php variable notation. I use the camel case when renaming variables, but I see a lot of underscores in PHP examples.

Is there a standard naming convention that most people use for PHP?

$ buildingHeight OR $ building_height

+6
source share
3 answers

Take a look:
http://pear.php.net/manual/en/standards.naming.php

It also contains some examples.

+1
source

, . , , .

, PHP-:

  • (_).

  • - az, AZ, 0-9 _.

, !

0

, - PHP .

:)

0

All Articles