PHP 4.0 Bug #3261 Updated: sess_register doesn't register global variables correctly

From: Date: Sun, 14 May 2000 08:34:13 +0000
Subject: PHP 4.0 Bug #3261 Updated: sess_register doesn't register global variables correctly
Groups: php.dev 
Request: Send a blank email to php-dev+get-18715@lists.php.net to get a copy of this message
ID: 3261 User Update by: stas@zend.com Old-Status: Closed Status: Open Bug Type: Misbehaving function Description: sess_register doesn't register global variables correctly What do you mean "unless specified"? Did you look at the code: function start() { global $count; // If *this* is not specification of global, what is? session_start(); session_register("count"); var_dump($count); // Which "count" is 0 here? If global, why it isn't 0 below? // If local, what happened to "global" $count I just defined and // how do I specify that I want *that* *global* count, and not // want to create new local one to override old one? } function see() { global $count; print "Here: $count<br>"; // And *how exactly* I got the right value here if session variable wasn't global? } Full Bug description available at: http://bugs.php.net/version4/?id=3261

« previous php.dev (#18715) next »