3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class SomeClass {} $instance = new SomeClass(); $reference = &$instance; echo (($instance === $reference) ? 'TRUE' : 'FALSE') ."\n"; $assigned = $instance; echo (($instance === $assigned) ? 'TRUE' : 'FALSE') ."\n"; $instance = null; echo $instance . "\n"; echo $reference . "\n"; echo $assigned . "\n";
based on nmhnW
Output for 7.1.0 - 7.2.0
TRUE TRUE Recoverable fatal error: Object of class SomeClass could not be converted to string in /in/Qo8vB on line 18
Process exited with code 255.
Output for 5.3.21 - 7.0.20
TRUE TRUE Catchable fatal error: Object of class SomeClass could not be converted to string in /in/Qo8vB on line 18
Process exited with code 255.