3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function search($input) { $result = $input; for($a=0;$a<count($input);$a++) { for($b=0;$b<count($input);,$a++) { for($c=1;$c<$b;$c++) { $d = $d . $input[$a+$c]; } $result[]= $d; $d=""; } } return array_filter(array_unique($result)); } print json_encode(search(["a", "b"])) . "\n"; print json_encode(search(["a", "b", "c"]));
Output for 5.3.0 - 5.4.15
Parse error: syntax error, unexpected ',', expecting ')' in /in/jDHR8 on line 8
Process exited with code 255.