3v4l.org

run code in 300+ PHP versions simultaneously
<?php class y { private $ppp = 123; } class x { public function __construct() { $x =& $this; $x = new y; var_dump(get_class($this)); $y = $this; var_dump($y->ppp); } } new x;

preferences:
38.16 ms | 402 KiB | 5 Q