3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { public $a = 5; } class Test2 { public function getA() { return NULL; } } $test = new Test2(); var_dump($test->getA()->a ?? 'leda hovno');
Output for hhvm-3.15.4, 7.0.0 - 7.2.6
string(10) "leda hovno"
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '?' in /in/H2oN8 on line 15
Process exited with code 255.