- var_dump: documentation ( source)
<?php
$x = NULL;
$y = NULL;
$z = NULL;
$result = !empty($x) ? $x : (!empty($y) ? $y : (!empty($z) ? $z : 'empty'));
echo $result . "\n";
// Using in PHP 7
$result2 = $x ?? $y ?? $z;
var_dump($result2);
echo "\n";