3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; public $baz; } $a = new Foo(); $b = &$a; $a->bar = 42; $b->baz = 43; var_dump($a, $b);

preferences:
25.19 ms | 404 KiB | 5 Q