3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Bar { public function foo() { return 1; } public function get() { return function() { return $this->foo() === static::foo(); } } } class Baz { public function foo() { return 2; } public function exec(callable $closure) { return $closure(); } } $bar = new Bar; $baz = new Baz; var_dump($baz->exec($bar->get()));
Output for 5.3.0 - 5.5.3
Parse error: syntax error, unexpected '}' in /in/GsvaD on line 16
Process exited with code 255.