3v4l.org

run code in 300+ PHP versions simultaneously
L<?php interface FooInterface { public function &get(); } class Foo implements FooInterface { protected $thing = 5; public function get() { return $this->thing; } } $foo = new Foo(); $thing = &$foo->get(); $thing = 7; var_dump($foo->get());

preferences:
37.64 ms | 402 KiB | 5 Q