|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-29 20:52 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
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"