#38875 [Com]: no new variables possible after self::$var = $_SESSION

From: Date: Mon, 18 Sep 2006 23:40:09 +0000
Subject: #38875 [Com]: no new variables possible after self::$var = $_SESSION
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-102386@lists.php.net to get a copy of this message
ID: 38875 Comment by: judas dot iscariote at gmail dot com Reported By: lagemann at x-wars dot net Status: Open Bug Type: Scripting Engine problem Operating System: Gentoo 3.3.6, ssp-3.3.6-1.0, pie PHP Version: 5.1.6 New Comment: yu cannot do this : $var = $_SESSION; or $_SESSION = array(1,2,3,4,5); because $_SESSION loose it's "magical" atributes then. and that is, the expected behaviuor. Previous Comments: ------------------------------------------------------------------------ [2006-09-18 22:22:19] lagemann at x-wars dot net Description: ------------ I set a static class var to $_SESSION ($varname = 'SESSION'; self::$$varname = $_SESSION;) and after some method calls and requires no new variable can be set in a method of the class. This problem occurs not if i set self::$$varname = &$_SESSION; tested with php 5.1.4, 5.1.6 and php 5.2.0RC5-dev (php5.2-200609172030) Reproduce code: --------------- Some more lines than 20: http://degola.de/phpbug/ Expected result: ---------------- in line 41 the variable $classArray have to be Array () Actual result: -------------- no new variable can be set, see http://degola.de/phpbug/ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38875&edit=1

« previous php.bugs (#102386) next »