#25626 [NEW]: Variables containing number starting with 0 (Zero) become 0 (Zero)

From: Date: Mon, 22 Sep 2003 10:23:44 +0000
Subject: #25626 [NEW]: Variables containing number starting with 0 (Zero) become 0 (Zero)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-47930@lists.php.net to get a copy of this message
From: sameh dot attia at tedata dot net Operating system: RHL 9 PHP version: 4.3.3 PHP Bug Type: Scripting Engine problem Bug description: Variables containing number starting with 0 (Zero) become 0 (Zero) Description: ------------ If u assigned a variable x any value that starts with 0; like 09; then the value inside the varaible becomes 0. This also happens when calling functions; paramters passed to the function suffer the same bug. Reproduce code: --------------- <?php $VarX = 09; echo "VarX = $VarX\n"; FunY(09); function FunY($VarY) { echo "VarY = $VarY\n"; } ?> Expected result: ---------------- VarX = 09 VarY = 09 Actual result: -------------- VarX = 0 VarY = 0 -- Edit bug report at http://bugs.php.net/?id=25626&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25626&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25626&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25626&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25626&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25626&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25626&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25626&r=support Expected behavior: http://bugs.php.net/fix.php?id=25626&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25626&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25626&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25626&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25626&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25626&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25626&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25626&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25626&r=float

« previous php.bugs (#47930) next »