3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Hoge { function test1() { func1($this); var_dump($this); } function test2() { func2(&$this); var_dump($this); } } function func1($var) { unset($var); } function func2(&$var) { unset($var); } $hoge = new Hoge; $hoge->test1(); var_dump($hoge); $hoge->test2(); var_dump($hoge);
Output for 5.4.0 - 5.5.3
Fatal error: Call-time pass-by-reference has been removed in /in/T6uRb on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.29
object(Hoge)#1 (0) { } object(Hoge)#1 (0) { } object(Hoge)#1 (0) { } object(Hoge)#1 (0) { }