#48879 [Opn->Bgs]: Numeric Variable Names
| From: | jani@php.net | Date: | Fri, 10 Jul 2009 18:11:18 +0000 |
| Subject: | #48879 [Opn->Bgs]: Numeric Variable Names | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139583@lists.php.net to get a copy of this message | ||
ID: 48879
Updated by: jani@php.net
Reported By: corrodedmonkee at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: Ubuntu/Windows
PHP Version: 5.2.10
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Just don't do it. And search the bug database before submitting, this
has been reported before..
Previous Comments:
------------------------------------------------------------------------
[2009-07-10 12:20:22] corrodedmonkee at gmail dot com
Description:
------------
You can create variables with numeric only names with double dollars.
It can be assigned data with double dollar also.
It will not throw any errors or warnings.
Reproduce code:
---------------
---
From manual page: language.variables.variable
---
<?php
$foo = 123;
$bar = 456;
$$foo = $bar;
echo '<pre>';
print_r(get_defined_vars());
?>
Expected result:
----------------
PHP Fatal Error
Actual result:
--------------
[foo] => 123
[bar] => 456
[123] => 456
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48879&edit=1