Last active
August 29, 2015 14:02
-
-
Save fmtarif/3ae411dc3ef51af31de8 to your computer and use it in GitHub Desktop.
#php nuances - stuff that are not quite obvious
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Case sensitive VS insensitive | |
| ------------------------------------------- | |
| From: http://stackoverflow.com/a/20624302/3540661 | |
| Case sensitive (both user defined and PHP defined) | |
| variables | |
| constants | |
| array keys | |
| class properties | |
| class constants | |
| Case insensitive (both user defined and PHP defined) | |
| functions | |
| class constructors | |
| class methods | |
| keywords and constructs (if, else, null, foreach, echo etc.) | |
| ------------ | |
| following are considered false when converted to boolean | |
| ------------------------------------------------------ | |
| array() | |
| "" | |
| "0" | |
| 0 | |
| 0.0 | |
| NULL or null or unset variables | |
| false | |
| object with no property (PHP 4 only) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment