mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-13 01:03:57 +02:00
Using php 7 feature in example
This commit is contained in:
@@ -87,7 +87,8 @@ rewritten like this:
|
|||||||
|
|
||||||
{% highlight php %}
|
{% highlight php %}
|
||||||
<?php
|
<?php
|
||||||
echo isset($foo['bar']) ? $foo['bar'] : '';
|
//Null Coalescing Operator
|
||||||
|
echo $foo['bar'] ?? '';
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
One instance where error suppression might make sense is where `fopen()` fails to find a file to load. You could check
|
One instance where error suppression might make sense is where `fopen()` fails to find a file to load. You could check
|
||||||
|
Reference in New Issue
Block a user