It's true, it will return 'yay'.

This commit is contained in:
Tom de Bruin
2012-10-12 09:13:43 +01:00
parent 724a5bb9b8
commit c95fc4250e

View File

@@ -303,7 +303,7 @@ echo ($a == 5) ? return true : return false; // this example will output an e
vs.
$a = 5;
return ($a == 5) ? 'yay' : 'nope'; // this example will return true
return ($a == 5) ? 'yay' : 'nope'; // this example will return 'yay'
{% endhighlight %}
* [Ternary operators](http://php.net/manual/en/language.operators.comparison.php)