3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class cywm528 { function __destruct() { echo 'cywm528.'; } } new cywm528; $obj1 = new cywm528; $obj2 = $obj1; unset($obj1); echo 'hi, '; $obj2 = null; echo ' ok!';
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
cywm528.hi, cywm528. ok!
Output for 4.3.0 - 4.4.9
hi, ok!