3v4l.org

run code in 200+ 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 - 7.2.0
cywm528.hi, cywm528. ok!
Output for 4.3.0 - 4.4.9
hi, ok!