<表达式1> ? <表达式2> : <表达式3>
比如说我想让表达式2什么也不干,但语法又要求必须要有内容才行,这时候写什么好?
PHP中文网2017-04-17 12:07:25
It is better to write if to decide whether to execute expression 3. It is impossible for expression 2 to execute the method, and this ternary expression has lost its meaning.