3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test{}; $a = spl_object_id(new test()); $b = spl_object_id(new test(2)); var_dump($a, $b);
based on Ho9Yj
Output for 7.2.0 - 7.3.0rc3
int(1) int(1)
Output for 7.0.0 - 7.1.20
Fatal error: Uncaught Error: Call to undefined function spl_object_id() in /in/mVaAR:4 Stack trace: #0 {main} thrown in /in/mVaAR on line 4
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Call to undefined function spl_object_id() in /in/mVaAR:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Call to undefined function spl_object_id() in /in/mVaAR:4 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function spl_object_id() in /in/mVaAR on line 4
Process exited with code 255.