php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31425 $string++ / $string-- ?
Submitted: 2005-01-06 06:35 UTC Modified: 2005-01-10 14:43 UTC
From: gregorschg at web dot de Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.0.3 OS: win xp
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gregorschg at web dot de
New email:
PHP Version: OS:

 

 [2005-01-06 06:35 UTC] gregorschg at web dot de
Description:
------------
I have a problem to decreasing strings.
Increasing a string works fine.



Reproduce code:
---------------
$letter = "C";
$letter--;
echo "$letter";

Expected result:
----------------
output of $str >> "B"


Actual result:
--------------
output of $str >> "C"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-08 20:17 UTC] gregorschg at web dot de
sorry, I mean output of $letter is "C" and expected output of $letter is "B".
 [2005-01-10 14:43 UTC] sniper@php.net
RTFM:
http://www.php.net/manual/en/language.operators.increment.php

"Note that character variables can be incremented but not decremented."


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC