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(new Lambda); echo $lambda->getLimit();
based on v1L3k
Output for 7.0.0 - 7.2.0
5
Output for 5.3.18 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/EKQM9 on line 17
Process exited with code 255.