3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { private $a; public function __construct($a) { $this->a = $a; } } $b = new Test(1); $a = $b; unset($b); var_dump($b); var_dump($a);
Output for 7.2.10
Notice: Undefined variable: b in /in/5jS3g on line 18 NULL object(Test)#1 (1) { ["a":"Test":private]=> int(1) }