The Elvis operator introduced in PHP 5.3 makes particular ternary operators easier.
<?php
$a = $a ? $a : false; // ElvisOperator: Use the Elvis operator instead of the ternary operator.
<?php
$a = $a ?: false; // OK!
The Elvis operator introduced in PHP 5.3 makes particular ternary operators easier.
<?php
$a = $a ? $a : false; // ElvisOperator: Use the Elvis operator instead of the ternary operator.
<?php
$a = $a ?: false; // OK!