3v4l.org

run code in 300+ PHP versions simultaneously
<?php function search($input) { $result = $input; for($a=0;$a<count($input);$a++) { for($b=0;$b<count($input);$b++) { $d=""; for($c=0;$c<=$b;$c++) { $d = $d . $input[$a+$c]; } $result[]= $d; } } return array_filter(array_unique($result)); } print json_encode(search(["a", "b"])) . "\n"; print json_encode(search(["a", "b", "c"]));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 2 in /in/JX1hZ on line 14 {"0":"a","1":"b","3":"ab"} Warning: Undefined array key 3 in /in/JX1hZ on line 14 Warning: Undefined array key 3 in /in/JX1hZ on line 14 Warning: Undefined array key 3 in /in/JX1hZ on line 14 Warning: Undefined array key 4 in /in/JX1hZ on line 14 {"0":"a","1":"b","2":"c","4":"ab","5":"abc","7":"bc"}

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
35.07 ms | 401 KiB | 8 Q