3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = null; $b = false; $c = $b ?: '1'; $d = $a ?? '2'; echo $c; echo $d;
based on mLtqs
Output for 7.0.0 - 7.2.0
12
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected '?' in /in/u2JuL on line 5
Process exited with code 255.