3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function ifsetor(&$variable, $default = null) { if (isset($variable)) { $tmp = $variable; } else { $tmp = $default; } return $tmp; } $x = ifsetor($foo['a'], 'bar'); echo $x;
Output for 4.3.0 - 7.1.0
bar