3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = ['foo'=>'bar']; //PHP5 style $message = isset($array['foo']) ? $array['foo'] : 'not set'; echo $message.PHP_EOL; //PHP7 style $message = $array['foo'] ?? 'not set'; echo $message.PHP_EOL;
based on QS7Lo
Output for hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0beta1
bar bar
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '?' in /in/oh118 on line 13
Process exited with code 255.