Re: PHP 4.0 Bug #3261 Updated: sess_register doesn't register global variables correctly
| From: | Sterling Hughes | Date: | Sun, 14 May 2000 11:59:41 +0000 |
| Subject: | Re: PHP 4.0 Bug #3261 Updated: sess_register doesn't register global variables correctly | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-18717@lists.php.net to get a copy of this message | ||
Bug Database wrote:
>
> ID: 3261
> User Update by: stas@zend.com
> Status: Closed
> 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?
Sorry, I botched my explanation up =).
It changes the scope when you go:
session_register("count");
Try:
var_dump($GLOBALS["count"]);
or:
session_register("count");
global $count;
var_dump($count);
-Sterling