![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveRe: $i++ problem understanding
From: Hilarion <hilarion@SPAM.op.SMIECI.pl>
Date: Wed Oct 05 2005 - 15:07:44 CEST
>> But much harder to accept is and I fail to see the logic in it,
My two cents:
Example:
some_function(($i++ * 2) + 4) | 7);
is equivalent to:
some_function(($i * 2) + 4) | 7); $i += 1;
Example for pre-increment operator:
some_function((++$i * 2) + 4) | 7);
is equivalent to:
$i += 1; some_function(($i * 2) + 4) | 7);
Hilarion
|