3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = new stdClass(); $var->foo = 'bar'; $var2 = $var; debug_zval_dump($var->foo); unset($var2->foo); debug_zval_dump($var->foo);
Output for 7.0.0 - 7.1.0
string(3) "bar" refcount(1) Notice: Undefined property: stdClass::$foo in /in/H6nRS on line 8 NULL
Output for hhvm-3.10.0 - 3.12.0
string(3) "bar" refcount(1) Notice: Undefined property: stdClass::$foo in /in/H6nRS on line 8 NULL refcount(1)
Output for 5.2.6 - 5.6.28
string(3) "bar" refcount(2) Notice: Undefined property: stdClass::$foo in /in/H6nRS on line 8 NULL refcount(1)
Output for 5.0.0 - 5.2.5
string(3) "bar" refcount(2) Notice: Undefined property: stdClass::$foo in /in/H6nRS on line 8 NULL refcount(1)
Output for 4.3.0 - 4.4.9
string(3) "bar" refcount(2) string(3) "bar" refcount(2)