3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = isset($b) ? $b : -1; $a = $b ?? -1; echo $a; // results: -1 $a = null; $b = null; $c = 10; $d = null; var_dump ($a ?? $b ?? $c ?? $d); // results: 10
based on eUAoJ
Output for 7.0.0 - 7.2.0
-1int(10)
Output for 5.3.18 - 5.6.28
Parse error: syntax error, unexpected '?' in /in/OldcW on line 3
Process exited with code 255.