From: paul dot guhl at mayflower dot de Operating system: any PHP version: 5.2.6 PHP Bug Type: Output Control Bug description: String to integer conversion
Description: ------------ Error occurs while implicit string to integer conversion, which should be performed by the prefix incermention. The ++ operator takes the input string as such and... "increments" the last character of the string. Error faced with PHP 5.2.0, 5.2.3 and 5.2.6. The test case was inspired by the Zend Certification Book :) Reproduce code: --------------- $a = 'Test'; echo ++$a; Expected result: ---------------- 1 Actual result: -------------- Tesu -- Edit bug report at http://bugs.php.net/?id=46345&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46345&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46345&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46345&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46345&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46345&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46345&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46345&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46345&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46345&r=support Expected behavior: http://bugs.php.net/fix.php?id=46345&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46345&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46345&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46345&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46345&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46345&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46345&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46345&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46345&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46345&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46345&r=mysqlcfg