3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=4; var_dump(spl_object_hash($a));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught TypeError: spl_object_hash(): Argument #1 ($object) must be of type object, int given in /in/afbEF:5 Stack trace: #0 /in/afbEF(5): spl_object_hash(4) #1 {main} thrown in /in/afbEF on line 5
Process exited with code 255.
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Warning: spl_object_hash() expects parameter 1 to be object, int given in /in/afbEF on line 5 NULL
Output for 5.6.38, 7.1.0 - 7.1.22, 7.2.0 - 7.2.33
Warning: spl_object_hash() expects parameter 1 to be object, integer given in /in/afbEF on line 5 NULL

preferences:
155.19 ms | 402 KiB | 167 Q