3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class lol { public function one() { return array_map(function ($elem) { return $this->parse($elem); }, array('one', 'two', 'three')); } public function parse($elem) { return strtoupper($elem) } } $lol = new lol; var_dump($lol->one());
based on s8CFd
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '}', expecting ';' in /in/WF2rS on line 12
Process exited with code 255.
Output for 5.3.21 - 5.6.16
Parse error: syntax error, unexpected '}' in /in/WF2rS on line 12
Process exited with code 255.