求前缀后缀真前缀真后缀_前缀/后缀增量/减量

求前缀后缀真前缀真后缀_前缀/后缀增量/减量

求前缀后缀真前缀真后缀

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 ????

PHP认证指南虽然简短,但在后缀和前缀操作这一主题上却非常清楚。 我唯一要说的是,由于本书使用的字体,前后的减号( -- )显示为一个长划线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.

另外,读者可能想知道是否可以合并这些操作,例如:<?php ++ $ a--; ++ $ a ++; ++($ a ++); (++ $ a)++; ++++ $ a; $ a ----; ?>那么,这些行都是无效的。 感谢上帝,他们是! 想象一下,读取和维护使用此类语句的代码将有多么困难。

Tell your friends about this post on Facebook and Twitter

FacebookTwitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/prefixpostfix-incrementdecrement/

求前缀后缀真前缀真后缀