3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { private $bar = '1'; } $foo = new Foo(); $f = function () { return $this->bar; }; for ($i = 1; $i < 101; $i++) { echo $f->call($foo); }
based on nH57k
Output for 7.0.0 - 7.2.0
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/NV43p on line 15
Process exited with code 255.