[Basic]Ternary operators inform minor change

This commit is contained in:
ftwbzhao
2015-11-17 00:11:47 +08:00
parent be731adf61
commit cbba996ea6

View File

@@ -385,6 +385,9 @@ Another example is the snippet below which will return true if ($a != 3 AND $b !
return ($a != 3 && $b != 4) || $c == 5; return ($a != 3 && $b != 4) || $c == 5;
{% endhighlight %} {% endhighlight %}
Since PHP 5.3, it is possible to leave out the middle part of the ternary operator.
Expression "expr1 ?: expr3" returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.
* [Ternary operators](http://php.net/language.operators.comparison) * [Ternary operators](http://php.net/language.operators.comparison)
## Variable declarations ## Variable declarations