3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Collection extends Traversable { /** * @return bool */ function isEmpty(); /** * @param callable $map * @return Collection */ function map(callable $map); /** * @param callable $filter * @return Collection */ function filter(callable $filter); /** * @param int $n * @return Collection */ function limit($n); /** * @param $initialValue * @param callable $combine * @return mixed */ function reduce($initialValue, callable $combine); /** * @param int $n * @return Collection */ function skip($n); /** * @param int $start * @param int $count * @return Collection */ function slice($start, $count); /** * Note that if you attempt to use keys that are not valid as a PHP array key then you will get errors. * @return array */ function toArray(); /** * @return Collection containing the keys as the values */ function keys(); /** * @return Collection containing the values but ignores keys */ function values(); }
based on EcqeF
Output for 5.0.0 - 7.2.0
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/ci5gt on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING in /in/ci5gt on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ci5gt on line 3
Process exited with code 255.