3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { private $fruit = 'pear'; } function getfunc() { $b = function() { $a = function() { return 'apple'; }; echo $a(),"\n"; return $this->fruit; }; return $b->call(new A()); } echo getfunc();
based on j4C8s
Output for 7.0.0 - 7.2.0
apple pear
Output for 5.3.19 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/NrLQI on line 13
Process exited with code 255.