mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-10 15:54:01 +02:00
Changed example return values
At request of Phil Sturgeon.
This commit is contained in:
@@ -303,7 +303,7 @@ echo ($a == 5) ? return true : return false; // this example will output an e
|
|||||||
vs.
|
vs.
|
||||||
|
|
||||||
$a = 5;
|
$a = 5;
|
||||||
return ($a == 5) ? true : false; // this example will return true
|
return ($a == 5) ? 'yay' : 'nope'; // this example will return true
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
* [Ternary operators](http://php.net/manual/en/language.operators.comparison.php)
|
* [Ternary operators](http://php.net/manual/en/language.operators.comparison.php)
|
||||||
|
Reference in New Issue
Block a user