php if else 1 line echo code example
Example: php one line if without else
$thisVar != $thatVar ?: doThis();
or
($thisVar == $thatVar) && doThis();
or
if ($thisVar == $thatVar) doThis();
$thisVar != $thatVar ?: doThis();
or
($thisVar == $thatVar) && doThis();
or
if ($thisVar == $thatVar) doThis();