PHP 4.0 Bug #6881: static variables can't be intialized by function, variable, etc.

From: Date: Tue, 26 Sep 2000 02:06:38 +0000
Subject: PHP 4.0 Bug #6881: static variables can't be intialized by function, variable, etc.
Groups: php.dev 
Request: Send a blank email to php-dev+get-33627@lists.php.net to get a copy of this message
From: simon@comsys.ntu-kpi.kiev.ua Operating system: FreeBSD 4.1-STABLE PHP version: 4.0.2 PHP Bug Type: *General Issues Bug description: static variables can't be intialized by function, variable, etc. #!php -q <? $a = "abc"; function foo() { global $a; static $b = $a; static $arr = array($a); } ?> I can't ini static variable by another variable or function. Even more PHP give error while parsing this code.

« previous php.dev (#33627) next »