3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { private $value = 5; } $x = new Foo(); $closure = function () { return $this->value; }; echo $closure->call($x);
based on e2Iss
Output for 7.0.0 - 7.2.0
5
Output for 5.3.21 - 5.6.21
Fatal error: Call to undefined method Closure::call() in /in/Rh3K7 on line 10
Process exited with code 255.