3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $st = new stdClass(); $st->q = new stdClass(); $st->q->k = 1; $st->q->w = 2; $kl = $st; unset($kl->q->k); print_r($st); print_r($k);
based on 9Bnq9
Output for 5.0.4 - 7.1.0
stdClass Object ( [q] => stdClass Object ( [w] => 2 ) ) Notice: Undefined variable: k in /in/sNHQG on line 11
Output for 5.0.0 - 5.0.3
stdClass Object ( [q] => stdClass Object ( [w] => 2 ) ) Notice: Undefined variable: k in /in/sNHQG on line 11
Output for 4.3.0 - 4.4.9
stdClass Object ( [q] => stdClass Object ( [k] => 1 [w] => 2 ) ) Notice: Undefined variable: k in /in/sNHQG on line 11