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; var_dump($b); var_dump($a);
Output for 7.2.10
object(Test)#1 (1) { ["a":"Test":private]=> int(1) } object(Test)#1 (1) { ["a":"Test":private]=> int(1) }