3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Lambda { private $limit = 5; public function getLimit() { return $this->limit; } } $lambda = new Lambda(); $closure = function() { $this->limit+= 5; }; $closure->call($lambda); echo $lambda->getLimit();
based on EKQM9
Output for 7.0.0 - 7.2.0
10
Output for 5.3.18 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/4DY6R on line 17
Process exited with code 255.