---This is where you are wrong. One cannot treat a variable with a null as its value as
So I ask this:
get_declared_classes, class_exists
get_defined_functions, function_exist
get_defined_constants, defined
get_defined_vars, ???
classes, functions, constants are available everywhere, not just in the current function. Including a foreign library adds classes, functions
and constants, but it won't mess with your variables if you encapsulate
properly. Additionally, for variables: isset() suffices. If a variable is null, you can treat it as nonexistant.
nonexistent. PHP itself doesn't even do that.
<?php $foo = null; echo $foo; echo $nonexistent; ?>
You will get PHP warnings on line 4 that $nonexistent doesn't exist, but NO warnings
on line 3 about $foo. PHP doesn't treat them the same, so how are we. PHP itself isn't consistent, and
why we all asked for variable_exists() to begin with. It helps clear up the inconsistency w/ isset() and PHP's handling of
echo $foo; vs. echo $nonexistent.
Walt