3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $value; public function Set($value) { $this->value = $value; } public function GetByRef(&$ref) { $ref = $this->value; //SET REF PARAMETER TO THIS VALUE BY REF } } $test = new Test(); $test->Set('test'); $test->GetByRef($value1); var_dump($value1); //NULL INSTEAD OF 'test'!

preferences:
42.16 ms | 402 KiB | 5 Q