Skip to content

Instantly share code, notes, and snippets.

@fmtarif
Last active August 29, 2015 14:02
Show Gist options
  • Save fmtarif/3ae411dc3ef51af31de8 to your computer and use it in GitHub Desktop.
Save fmtarif/3ae411dc3ef51af31de8 to your computer and use it in GitHub Desktop.
#php nuances - stuff that are not quite obvious
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