3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function search($input) { $result = $input; for($a=0,$a<5,$a++){ for($b=0,$b<count($input),$a++){ for($c=1,$c<b,$c++){ $d = $d . $input[$a+$c]; } $result[]= $b; $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/Yav6N on line 6
Process exited with code 255.