|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-12-18 21:06 UTC] alindeman@php.net
Description:
------------
It is possible to set variables that start with numbers.
I reproduced this with a PHP 4.3.x-dev snapshot AND PHP 5.0.0b2 (I was unable to get a snap to compile. autoconf errors out the wazoo).
Reproduce code:
---------------
andrew@laptop cli $ ./php -r '${1} = "foo"; echo ${1}, "\n";'
foo
Expected result:
----------------
A parse error
Actual result:
--------------
Outputs 'foo'
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 19:00:01 2025 UTC |
Confirmed this bug is in PHP 5 B3RC1 as well. It gets worse, you can put whatever you want in ${} and it'll take it just fine...Updated version, changed category. php -r '${1} = "foo"; echo ${1}, "\n";' still outputs foo.