3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = null; print $a ?? 'b'; print "\n"; print $a ?: 'b'; print "\n"; print $c ?? 'a'; print "\n"; print $c ?: 'a'; print "\n";
based on QvC9H
Output for hhvm-3.11.1 - 3.21.3, 7.0.0 - 7.2.4
b b a Notice: Undefined variable: c in /in/nZDFs on line 14 a
Output for hhvm-3.22.0
b b a Notice: Undefined variable: c in /in/nZDFs on line -1 a
Output for hhvm-3.10.1
Fatal error: syntax error, unexpected '?' in /in/nZDFs on line 5
Process exited with code 255.
Output for 5.5.0 - 5.6.30
Parse error: syntax error, unexpected '?' in /in/nZDFs on line 5
Process exited with code 255.