|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: paul dot guhl at mayflower dot de
New email:
PHP Version: OS:


 [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: Tue Jun 06 17:03:39 2023 UTC