3v4l.org

run code in 300+ PHP versions simultaneously
<?php function search($input) { $result = $input; for($a=0,$a<count($input),$a++) { print "1"; } 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"]));

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.0140.04512.37
5.4.140.0300.05812.06
5.4.130.0160.04312.04
5.4.120.0140.04212.01
5.4.110.0120.04412.00
5.4.100.0300.07212.00
5.4.90.0220.06512.00
5.4.80.0140.04212.00
5.4.70.0140.04212.00
5.4.60.0150.04212.00
5.4.50.0150.04012.00
5.4.40.0160.03911.98
5.4.30.0140.04511.98
5.4.20.0130.04511.98
5.4.10.0150.04011.98
5.4.00.0140.05711.47
5.3.250.0230.03712.72
5.3.240.0160.04312.72
5.3.230.0180.04212.71
5.3.220.0250.08112.68
5.3.210.0160.04512.68
5.3.200.0180.04312.68
5.3.190.0180.04312.68
5.3.180.0170.04212.67
5.3.170.0340.06912.67
5.3.160.0160.04512.67
5.3.150.0170.04212.67
5.3.140.0160.04412.66
5.3.130.0170.04512.66
5.3.120.0190.04112.66
5.3.110.0220.06812.66
5.3.100.0150.04312.12
5.3.90.0150.04212.09
5.3.80.0140.04512.08
5.3.70.0160.04312.07
5.3.60.0130.04912.06
5.3.50.0130.04512.01
5.3.40.0110.04712.01
5.3.30.0160.04111.97
5.3.20.0160.05711.75
5.3.10.0120.04411.71
5.3.00.0140.04211.69

preferences:
137.42 ms | 1399 KiB | 7 Q