3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh class Duplicator { private function transform($value) { return $value * 2; } public function getTransformed($stuff) { return $stuff->map(array($this, 'transform')); } } $duplicator = new Duplicator(); $stuff = Vector {1,2,3}; var_dump($duplicator->getTransformed($stuff));
based on UWfAA
Output for 5.4.0 - 5.4.32
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/C24hl on line 3
Process exited with code 255.