ID: 26662 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Verified Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4CVS-2003-12-18 (stable) New Comment:
Verified on PHP5b2, FreeBSD 4.4. PHP4 Snapshot on FreeBSD 4.4 yields this: [EMAIL PROTECTED]:~/php4-STABLE-200312190030/sapi/cli]$ ./php -r '${1} = "foo"; echo ${1}, "\n";' Segmentation fault (core dumped) Running the script on Win32 PHP4 snapshot (same one) gives an "Application Error". Previous Comments: ------------------------------------------------------------------------ [2003-12-18 21:25:21] [EMAIL PROTECTED] 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... ------------------------------------------------------------------------ [2003-12-18 21:06:52] [EMAIL PROTECTED] 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: --------------- [EMAIL PROTECTED] cli $ ./php -r '${1} = "foo"; echo ${1}, "\n";' foo Expected result: ---------------- A parse error Actual result: -------------- Outputs 'foo' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26662&edit=1