3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $f = function () { return $this->n; }; class MyClass { private $n = 42; } $myC = new MyClass; $f->call($myC);
based on bWt4S
Output for 7.0.0 - 7.2.0
Output for 5.3.19 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/jo43h on line 9
Process exited with code 255.