3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $value = 3; function &getValue() { return $this->value; } function test() { $params = array(); $params[] = &$this->getValue(); $params[] = $this->getValue(); return $params; } } $foo = new Foo(); var_dump($foo->test());

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
229.49 ms | 2714 KiB | 11 Q