penders - 10:45 pm on Apr 24, 2013 (gmt 0)
Yeah, PHP can be a bit too lenient at times (certainly compared to other languages). Some "notices" might be as a result of a more serious runtime error. Certainly whilst developing, it is a good idea to enable full error reporting at the top of your script:
And to even include the strict reporting (of deprecated usage):
error_reporting(E_ALL | E_STRICT)
is_null() specifically checks for the value null, and is equivalent to:
if ($var === null)
isset() returns true if the variable is defined and is not null. No "notice" is generated if the variable is not defined.
empty() returns true if the variable is not defined or is any one of null, false, empty string, 0 (zero), '0' or empty array. No "notice" is generated if the variable is not defined.