#49539 [NEW]: {08} and {09} behave like {00}

From: Date: Sun, 13 Sep 2009 03:50:26 +0000
Subject: #49539 [NEW]: {08} and {09} behave like {00}
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-142289@lists.php.net to get a copy of this message
From: info at daniel-marschall dot de Operating system: Linux PHP version: 5.2.10 PHP Bug Type: *General Issues Bug description: {08} and {09} behave like {00} Description: ------------ I believe I found an error in PHP 5.2.0-8+etch15 (cli) <?php $quad = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; echo $quad{8}; // I echo $quad{08}; // A <- ERROR echo $quad{9}; // K echo $quad{09}; // A <- ERROR ?> The other values {00} to {07} are working as expected. Why doesn'T {08} and {09} work? They should behave like {8} and {9} since 08 == 8 and 09 == 9. Reproduce code: --------------- <?php $quad = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; echo $quad{8}; // I echo $quad{08}; // A <- ERROR echo $quad{9}; // K echo $quad{09}; // A <- ERROR ?> Expected result: ---------------- Output: IIKK Actual result: -------------- Output: IAKA -- Edit bug report at http://bugs.php.net/?id=49539&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49539&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49539&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49539&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49539&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49539&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49539&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49539&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49539&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49539&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49539&r=support Expected behavior: http://bugs.php.net/fix.php?id=49539&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49539&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49539&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49539&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49539&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49539&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49539&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49539&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49539&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49539&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49539&r=mysqlcfg

« previous php.bugs (#142289) next »