3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = true; var_dump($foo ?: $bar); var_dump($foo ?? $bar); var_dump($bar ?: $foo); var_dump($bar ?? $foo);
based on 77OW7
Output for 7.0.28 - 7.3.0rc3
bool(true) bool(true) Notice: Undefined variable: bar in /in/fr367 on line 8 bool(true) bool(true)
Output for 5.6.38
Parse error: syntax error, unexpected '?' in /in/fr367 on line 6
Process exited with code 255.