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),$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"]));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.150.1800.04319.20
5.4.140.1430.04316.39
5.4.130.1600.04016.36
5.4.120.1500.03716.33
5.4.110.1730.04716.45
5.4.100.1670.04716.28
5.4.90.1770.03016.28
5.4.80.1670.05316.26
5.4.70.1600.04016.53
5.4.60.1800.03316.38
5.4.50.1570.04016.44
5.4.40.1430.03716.43
5.4.30.0170.03316.43
5.4.20.0200.06716.51
5.4.10.0130.03716.34
5.4.00.0200.07016.09
5.3.250.0230.05314.53
5.3.240.0230.06714.61
5.3.230.0270.07014.75
5.3.220.0200.07314.72
5.3.210.0200.06014.49
5.3.200.0430.06714.49
5.3.190.0230.06714.54
5.3.180.0170.04014.65
5.3.170.0100.04714.64
5.3.160.0170.06014.54
5.3.150.0230.06714.57
5.3.140.0230.05314.78
5.3.130.0200.07014.79
5.3.120.0230.05314.65
5.3.110.0230.06714.60
5.3.100.0130.04714.04
5.3.90.0200.07014.14
5.3.80.0270.05714.02
5.3.70.0230.07014.03
5.3.60.0130.04013.92
5.3.50.0100.04013.84
5.3.40.0130.04014.18
5.3.30.0200.03313.98
5.3.20.0130.03713.59
5.3.10.0130.06313.77
5.3.00.0200.04713.80

preferences:
139.74 ms | 1394 KiB | 7 Q