3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $object1 = new \stdClass; var_dump($object1); $object2 = new \stdClass; var_dump($object2); echo ($object1 == $object2) ? 'Same object' : 'Not the same object';
based on U6iNt
Output for 5.3.0 - 7.2.0
object(stdClass)#1 (0) { } object(stdClass)#2 (0) { } Same object
Output for 5.0.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/8YI7T on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/8YI7T on line 5 object(stdClass)#1 (0) { } object(stdClass)#2 (0) { } Same object
Output for 4.3.0 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/8YI7T on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/8YI7T on line 5 object(stdClass)(0) { } object(stdClass)(0) { } Same object