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=1;$c<$b;$c++) { $d = $d . $input[$a+$c]; } $result[]= $d; } } foreach($input as $a) foreach($input as $b) $result[]= $a . $b; 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
{"0":"a","1":"b","6":"aa","7":"ab","8":"ba","9":"bb"} Warning: Undefined array key 3 in /in/e8rWX on line 14 {"0":"a","1":"b","2":"c","12":"aa","13":"ab","14":"ac","15":"ba","16":"bb","17":"bc","18":"ca","19":"cb","20":"cc"}

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:
46.59 ms | 402 KiB | 8 Q