Req #72802 [Opn->Wfx]: static $$var; // not work
Edit report at https://bugs.php.net/bug.php?id=72802&edit=1
ID: 72802
Updated by: nikic@php.net
Reported by: bear8811 at mail dot com
Summary: static $$var; // not work
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: Unknown/Other Function
Operating System: Linux
PHP Version: 7.0.2
Block user comment: N
Private report: N
New Comment:
Sorry, this conversation is not proving fruitful. Won't Fix.
Previous Comments:
------------------------------------------------------------------------
[2016-08-10 13:31:47] bear8811 at mail dot com
No. Then I'll have to edit the code every day)
------------------------------------------------------------------------
[2016-08-10 13:21:35] nikic@php.net
What do you need this for? Why cannot your use-case be expressed (more clearly) in terms of a static
array?
function fnc($var) {
static $vars = [];
// use $vars[$var]
}
------------------------------------------------------------------------
[2016-08-10 13:18:38] bear8811 at mail dot com
This functionality is necessary for me.
------------------------------------------------------------------------
[2016-08-10 13:02:16] bear8811 at mail dot com
OMG, it is BUG!
------------------------------------------------------------------------
[2016-08-10 12:06:00] nikic@php.net
To clarify, this has never worked, so marking it as a feature request.
I don't think this will be implemented, as it does not seem like a particularly useful feature
and it will only complicate implementation.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=72802
--
Edit this bug report at https://bugs.php.net/bug.php?id=72802&edit=1
Thread (8 messages)