3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = '1'; $bar = '0'; var_dump($foo ?: $bar); var_dump($foo ?? $bar); var_dump($bar ?: $foo); var_dump($bar ?? $foo);
based on lPMlQ
Output for 7.0.28 - 7.3.0rc3
string(1) "1" string(1) "1" string(1) "1" string(1) "0"
Output for 5.6.38
Parse error: syntax error, unexpected '?' in /in/Mk2k1 on line 7
Process exited with code 255.