Yes, I tested on the development server using PHP 4.3.2 with register_globals off and everything is just fine!
Phil
PS: Further testing on the other environment produced this wacko result:
8val = and myDisplay =
isset val?
Array ( [section] => person [action] => edit_person [PHPSESSID] => 6f37032f8b893689c3e1b89ef8e1215a ) inside getCount:
9val = 0 and myDisplay = 0
Here is the code that generates that stuff:
if ($authBool && $action && class_exists(ucfirst($action) . 'View')) {
print_r("7val = $val and myDisplay = $myDisplay<P>");
print_r(isset($val));
$junk = eval('$' . $action . 'View =& new ' . ucfirst($action) . 'View($id);');
print_r("8val = $val and myDisplay = $myDisplay<P>");
print_r("isset val? "); print_r(isset($val)); print_r("<P>");
$displayHTML = ${$action . 'View'}->displayHTML();
unset($val); unset($myDisplay);
print_r("9val = $val and myDisplay = $myDisplay<P>");
print_r("isset val? "); print_r(isset($val)); print_r("<P>");
${$action . 'View'} = null;
}
Between 8 and 9 I do a class method that returns HTML stuff and then physically unset both $val and $myDisplay, and yet they STILL retain values of 0 that it could have never received!!!
Phil
PS: Further testingt:
echo "val = $val<P>";
print_r(isset($val)); print_r("<P>");
print_r(strlen($val)); print_r("<P>");
print_r(is_numeric($val)); print_r("<P>");
Produces:
According to this, $val does not exist and has a value of 0. Is that possible in any version of PHP for a value to not exist (not null, mind you, unset($val)! ) and yet have a declared value of 0 even though it is nonnexistent, much less non-numeric?