#48112 [NEW]: Printing a "++"
From: colin at shuaige dot org
Operating system: Windows Server 2003 (and others)
PHP version: 5.2.9
PHP Bug Type: Feature/Change Request
Bug description: Printing a "++"
Description:
------------
Printing a short-hand addition statement ("++") produces the value of the
integer before the statement was run instead of the integer "+ 1".
Reproduce code:
---------------
$test = 0;
echo $test++;
// produces "0"
echo $test;
// produces "1"
Expected result:
----------------
$test = 0;
echo $test++;
// produces "1"
echo $test;
// produces "1"
Actual result:
--------------
$test = 0;
echo $test++;
// produces "0"
echo $test;
// produces "1"
--
Edit bug report at http://bugs.php.net/?id=48112&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48112&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48112&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48112&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48112&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48112&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48112&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48112&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48112&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48112&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48112&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48112&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48112&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48112&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48112&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48112&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48112&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48112&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48112&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48112&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48112&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48112&r=mysqlcfg
Thread (2 messages)
- colin at shuaige dot org