From: aries dot belgium at gmail dot com Operating system: Linux PHP version: 5.2.4RC1 PHP Bug Type: Variables related Bug description: Weird integer conversion behaviour
Description: ------------ When placing a zero in front of a number PHP will convert it automatically to an integer value, but it becomes a zero rather than the number after the zero. Reproduce code: --------------- <?php $a = intval(08); $b = intval('08'); var_dump($a,$b,08); ?> Expected result: ---------------- int(8) int(8) int(8) Actual result: -------------- int(0) int(8) int(0) -- Edit bug report at http://bugs.php.net/?id=42213&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42213&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42213&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42213&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42213&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42213&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42213&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42213&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42213&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42213&r=support Expected behavior: http://bugs.php.net/fix.php?id=42213&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42213&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42213&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42213&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42213&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42213&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42213&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42213&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42213&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42213&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42213&r=mysqlcfg