Bug #14264: Session variable not keeping track of increment

From: Date: Wed, 28 Nov 2001 10:42:42 +0000
Subject: Bug #14264: Session variable not keeping track of increment
Groups: php.dev 
Request: Send a blank email to php-dev+get-71898@lists.php.net to get a copy of this message
From: francis@natsoft.com.my Operating system: RedHat LINUX 7.2 PHP version: 4.1.0 PHP Bug Type: Session related Bug description: Session variable not keeping track of increment With this piece of code the session variable is not keeping track of the increment: <?php error_reporting(63); session_start(); $abc = ''; session_register('abc'); $abc += 1; $_SESSION['abc'] += 2; print "<pre>$abc\n\n"; print_r( $_SESSION); ?> While minor alteration of above code as below the session variable works: <?php error_reporting(63); $abc = ''; session_start(); session_register('abc'); $abc += 1; $_SESSION['abc'] += 2; print "<pre>$abc\n\n"; print_r( $_SESSION); ?> -- Edit bug report at: http://bugs.php.net/?id=14264&edit=1

« previous php.dev (#71898) next »