Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (9 sloc) 146 Bytes
<?php
#bad
if(some_function() !== null){
$value = some_function();
}else{
$value = 'Default';
}
#good
$value = some_function() ?: 'Default';
You can’t perform that action at this time.