3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $instance = new SimpleClass(); $assigned = $instance; $reference =& $instance; $instance->var = '$assigned will have this value'; $instance = null; // $instance and $reference become null var_dump($instance); var_dump($reference); var_dump($assigned);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'SimpleClass' not found in /in/t5WCo:3 Stack trace: #0 {main} thrown in /in/t5WCo on line 3
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Class 'SimpleClass' not found in /in/t5WCo on line 3
Process exited with code 255.