3v4l.org

run code in 300+ PHP versions simultaneously
<?php function NC($x){ $y = array(); $y['test'] = $x; $returnThis = $y['test'] ?? "Foo"; return $returnThis; } var_dump(NC(NULL)); // I know this will return "Foo". /* But I have no clue about what these will return. */ var_dump(NC(0)); var_dump(NC(-1)); var_dump(NC("")); var_dump(NC(array()));

preferences:
84.67 ms | 402 KiB | 5 Q