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 = 100; $i < 101; $i++) { echo $f->call($foo); }
Output for 7.0.0 - 7.2.0
1
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/nH57k on line 15
Process exited with code 255.