3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test { public function titi() { return "ok"; } } $toto = new Test(); echo $toto->titi() ?? "ok"; echo $toto->tata() ?? "ok";
based on SgZ3K
Output for 7.0.0 - 7.2.6
ok Fatal error: Uncaught Error: Call to undefined method test::tata() in /in/bdj4j:14 Stack trace: #0 {main} thrown in /in/bdj4j on line 14
Process exited with code 255.
Output for hhvm-3.22.0
ok Fatal error: Uncaught Error: Call to undefined method test::tata() in /in/bdj4j:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
ok Fatal error: Uncaught Error: Call to undefined method test::tata() in /in/bdj4j:14 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '?' in /in/bdj4j on line 13
Process exited with code 255.