3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class test { private $f; public function __construct(&$f) { $this->f = &$f; } public function __destruct() { $this->f = 1; } } $f = function () use (&$f) { $t = new test($f); print 1; }; var_dump($f)
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected end of file in /in/sBKNH on line 20
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/sBKNH on line 20
Process exited with code 255.