ID: 27128
Updated by: [EMAIL PROTECTED]
Reported By: dizit at mail dot ru
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: Win XP
PHP Version: 4.3.4
New Comment:
The behaviour is correct.
(and hasn't changed since 4.2.2, the output of the script is exactly
same with 4.2.2 and 4.3.4)
Previous Comments:
------------------------------------------------------------------------
[2004-02-03 05:57:17] dizit at mail dot ru
Description:
------------
Run script below and see next:
BEGIN___________________________________________________
set var=56
session_register("var")
var=56
$GLOBALS["var"] - 56
session_unset()
ATENTION----> var=56
ATENTION----> $GLOBALS["var"] - and gettype($GLOBALS["var"]) is NULL
session_register("another")
ATENTION----> var="another"
___________________________________________________END
If run the script in the Zend Develoment Env. 3.02 Plus and see next
result:
BEGIN____________________________________________________
set var=56
session_register("var")
var=56
$GLOBALS["var"] - 56
session_unset()
var=56
$GLOBALS["var"] = 56 and gettype($GLOBALS["var"]) is integer
session_register("another")
var=56
____________________________________________________END
Win XP
Apache 1.3.26
php 4.3.2 and 4.3.4
php.ini
register_globals = On
Reproduce code:
---------------
<?
session_start();
$var=56;
echo '<p>set var=56';
session_register('var');
echo '<p>session_register("var")';
echo '<p>echo var='.$var;
echo '<p>echo $GLOBALS["var"] - '[EMAIL PROTECTED]'var'];
session_unset();echo '<p>session_unset()';
echo '<p>echo var='.$var;
echo '<p>echo $GLOBALS["var"] - '[EMAIL PROTECTED]'var'].' and
gettype($GLOBALS["var"]) is '.gettype(@$GLOBALS['var']);
session_register('another');
echo '<p>session_register("another")';
echo '<p>Once more echo var='.$var;
session_destroy();
?>
Expected result:
----------------
run on PHP Version 4.2.2 and see:
set var=56
session_register("var")
var=56
$GLOBALS["var"] - 56
session_unset()
var=NULL
$GLOBALS["var"] = NULL
session_register("another")
var=NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27128&edit=1