php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #74329
Patch fix-precedence-doc-inconsistency revision 2017-03-29 08:20 UTC by pierstoval at gmail dot com

Patch fix-precedence-doc-inconsistency for Scripting Engine problem Bug #74329

Patch version 2017-03-29 08:20 UTC

Return to Bug #74329 | Download this patch
Patch Revisions:

Developer: pierstoval@gmail.com

-Example #2 Undefined order of evaluation
+Example #2 Combining operators

 <?php
 $a = 1;
-echo $a + $a++; // may print either 2 or 3
+echo $a + $a++; // Will print 3

 $i = 1;
-$array[$i] = $i++; // may set either index 1 or 2
+$array[$i] = $i++; // Array will be equal to array(2 => 1)
 ?>
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 23:00:01 2026 UTC