Bug #11449 Updated: it is not possible to declare a static variable variable
| From: | zeev@php.net | Date: | Fri, 15 Jun 2001 10:54:01 +0000 |
| Subject: | Bug #11449 Updated: it is not possible to declare a static variable variable | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-57022@lists.php.net to get a copy of this message | ||
ID: 11449
Updated by: zeev
Reported By: lasconi@free.fr
Status: Open
Bug Type: Scripting Engine problem
Operating system:
PHP Version: 4.0.5
Assigned To:
Comments:
Static variables are a 'feature' of the function, and are declared in compile-time. Since
it's impossible to know their name in compile-time, it's not possible to use varying
expression as the static variable name.
Previous Comments:
---------------------------------------------------------------------------
[2001-06-12 20:23:22] lasconi@free.fr
this script produces a parse error:
function test(){
$a="a";
static $$a;
}
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11449&edit=2