3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump('' ?? 123); var_dump(null ?? 123); var_dump(false ?? 123); var_dump(0 ?? 123); var_dump(empty(''), empty(null), empty(false), empty(0));
based on csdg2
Output for hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0beta1
string(0) "" int(123) bool(false) int(0) bool(true) bool(true) bool(true) bool(true)
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '?' in /in/G4ivj on line 3
Process exited with code 255.