I found weird behavior in PHP, it looks like “reversed register globals”. First try this:
session_start();
$_SESSION['test'] = NULL;
echo $_SESSION['test'];
This outputs nothing. Then change line 2:
session_start();
$test = 1;
echo $_SESSION['test'];
This outputs “1”!
This only happens if I set $_SESSION[‘test’] to NULL!
Register globals if 100% off.
My hosting provider has PHP 5.2.17. This does not happen on my local 5.3.6.
Is this a bug or is there a setting for this?
Problem solved!
I changed php.ini from:
To:
Thanks Kerrek SB!