|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46345 String to integer conversion
Submitted: 2008-10-20 11:44 UTC Modified: 2008-10-20 11:48 UTC
From: paul dot guhl at mayflower dot de Assigned:
Status: Not a bug Package: Output Control
PHP Version: 5.2.6 OS: any
Private report: No CVE-ID: None
 [2008-10-20 11:44 UTC] paul dot guhl at mayflower dot de
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:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-20 11:48 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

Sorry, this is expected (and documented at
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Jun 07 09:03:43 2023 UTC