3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Assignment of an object Class Object{ public $foo="bar"; }; $objectVar = new Object(); $reference =& $objectVar; $assignment = $objectVar; $objectVar->foo = "qux"; var_dumpprint_r( $objectVar ); var_dumpprint_r( $reference ); var_dumpprint_r( $assignment ); $objectVar = null; var_dump($objectVar); var_dump($reference); var_dump($assignment);
based on 9eMRp
Output for 7.2.0
Fatal error: Cannot use 'Object' as class name as it is reserved in /in/34Wgf on line 4
Process exited with code 255.
Output for 7.0.0 - 7.1.10
Fatal error: Uncaught Error: Call to undefined function var_dumpprint_r() in /in/34Wgf:13 Stack trace: #0 {main} thrown in /in/34Wgf on line 13
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined function var_dumpprint_r() in /in/34Wgf on line 13
Process exited with code 255.