mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-10 15:54:01 +02:00
Using php 7 feature in example
This commit is contained in:
@@ -87,7 +87,8 @@ rewritten like this:
|
||||
|
||||
{% highlight php %}
|
||||
<?php
|
||||
echo isset($foo['bar']) ? $foo['bar'] : '';
|
||||
//Null Coalescing Operator
|
||||
echo $foo['bar'] ?? '';
|
||||
{% endhighlight %}
|
||||
|
||||
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