ID: 46345 Updated by: [EMAIL PROTECTED] Reported By: paul dot guhl at mayflower dot de -Status: Open +Status: Bogus Bug Type: Output Control Operating System: any PHP Version: 5.2.6 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Sorry, this is expected (and documented at http://no.php.net/manual/en/language.operators.increment.php) Previous Comments: ------------------------------------------------------------------------ [2008-10-20 11:44:18] paul dot guhl at mayflower dot de 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 this bug report at http://bugs.php.net/?id=46345&edit=1