prefix/postfix increment/decrement

March 9th, 2005. Tagged: PHP certification

The PHP certification guide is short but perfectly clear on the topic of postfix and prefix operations.
My only remark is that due to the font used in this book, the pre/postfix decrement (--) is displayed as one long dash 🙁

Also the reader might be wondering if one can combine those operations, like:
< ?php ++$a--; ++$a++; ++($a++); (++$a)++; ++++$a; $a----; ?>
Well, these lines are all invalid. And thank God they are! Imagine how hard it would be to read and maintain code that's using such statements.

Tell your friends about this post: Facebook, Twitter, Google+

Sorry, comments disabled and hidden due to excessive spam. Working on restoring the existing comments...

Meanwhile, hit me up on twitter @stoyanstefanov