3v4l.org

run code in 300+ PHP versions simultaneously
<?php function depth_picker($arr, $temp_string, &$collect) { if ($temp_string != "") $collect []= $temp_string; for ($i=0; $i<sizeof($arr);$i++) { $arrcopy = $arr; $elem = array_splice($arrcopy, $i, 1); // removes and returns the i'th element if (sizeof($arrcopy) > 0) { depth_picker($arrcopy, $temp_string ." " . $elem[0], $collect); } else { $collect []= $temp_string. " " . $elem[0]; } } } $collect = array(); depth_picker(array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'), "", $collect); print_r($collect);

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)
8.3.60.0500.12165.17
8.3.50.0400.13566.32
8.3.40.0330.07043.00
8.3.30.0230.07643.20
8.3.20.0190.03645.27
8.3.10.0030.04544.69
8.3.00.0100.04444.94
8.2.180.0470.15065.02
8.2.170.0300.07043.11
8.2.160.0260.07144.68
8.2.150.0130.04044.54
8.2.140.0140.04144.45
8.2.130.0340.02043.21
8.2.120.0100.03543.68
8.2.110.0270.08644.55
8.2.100.0300.05643.31
8.1.280.0790.12672.55
8.1.270.0400.04050.18
8.1.260.0160.03948.28
8.1.250.0300.03050.36
8.1.240.0260.06546.74
8.1.230.0430.06746.81
7.4.30.0970.28072.65
7.4.20.0850.24472.50
7.4.10.0540.23172.57
7.4.00.0550.23372.06
7.3.150.0710.27672.49
7.3.140.0690.28972.43
7.3.130.0490.35472.49
7.3.120.0510.33272.58
7.3.110.0740.27172.72
7.3.100.0640.31471.94
7.3.90.0590.27472.06
7.3.80.0770.34072.05
7.3.70.0580.33172.00
7.3.60.0880.38271.99
7.3.50.0660.27572.08
7.3.40.0700.30672.02
7.3.30.0750.36771.98
7.3.20.0680.29272.76
7.3.10.0730.28072.58
7.3.00.0760.29472.61
7.2.280.0870.32772.44
7.2.270.0690.28272.79
7.2.260.0480.31972.78
7.2.250.0530.33372.76
7.2.240.0910.44172.67
7.2.230.0660.35072.20
7.2.220.0610.35472.28
7.2.210.0610.34072.30
7.2.200.0820.37372.24
7.2.190.0630.38272.28
7.2.180.0610.34772.23
7.2.170.0550.31572.19
7.2.160.0550.40172.27
7.2.150.0660.31672.89
7.2.140.0840.32972.80
7.2.130.0550.29972.87
7.2.120.0520.30772.92
7.2.110.0500.34472.86
7.2.100.0580.31872.88
7.2.90.0780.32772.94
7.2.80.0730.30772.81
7.2.70.0700.33572.95
7.2.60.0730.31472.88
7.2.50.0730.31672.80
7.2.40.0730.29972.95
7.2.30.0760.29872.84
7.2.20.0860.30267.58
7.2.10.0750.29672.84
7.2.00.0970.31972.80
7.1.330.0800.43172.91
7.1.320.0840.45171.89
7.1.310.0890.48971.87
7.1.300.0650.46271.86
7.1.290.0920.43671.86
7.1.280.0800.45871.89
7.1.270.0790.49971.83
7.1.260.0720.38471.76
7.1.250.0760.43071.86
7.1.240.0840.37271.92
7.1.230.0610.44572.53
7.1.220.0690.41072.70
7.1.210.0540.41672.57
7.1.200.0670.39972.70
7.1.190.0530.40772.63
7.1.180.0650.21550.65
7.1.170.0590.41072.68
7.1.160.0770.40672.62
7.1.150.0610.41172.57
7.1.140.0650.46772.57
7.1.130.0540.42172.46
7.1.120.0990.46572.57
7.1.110.1070.53772.84
7.1.100.1040.45172.63
7.1.90.0680.43772.70
7.1.80.0950.46472.45
7.1.70.0890.44672.69
7.1.60.0710.49572.69
7.1.50.1100.49972.64
7.1.40.1030.50072.75
7.1.30.0510.42372.72
7.1.20.0450.42472.60
7.1.10.0440.46372.43
7.1.00.0770.41272.49
7.0.330.0880.43171.88
7.0.320.1070.43971.61
7.0.310.0890.41071.70
7.0.300.0770.45471.88
7.0.290.1270.62771.89
7.0.280.1130.37771.69
7.0.270.1030.41371.79
7.0.260.1530.60271.77
7.0.250.1100.41771.92
7.0.240.1060.45671.72
7.0.230.0840.45271.72
7.0.220.0860.35971.90
7.0.210.1010.38871.79
7.0.200.0920.41371.86
7.0.190.2630.68471.83
7.0.180.1280.44171.66
7.0.170.1100.55671.74
7.0.160.0980.41371.83
7.0.150.0790.43571.71
7.0.140.1000.50771.83
7.0.130.0880.35771.89
7.0.120.1250.39171.80
7.0.110.1410.49471.57
7.0.100.0870.50371.93
7.0.90.0990.43371.80
7.0.80.1040.36571.62
7.0.70.0900.40171.84
7.0.60.0590.41371.63
7.0.50.0830.38871.80
7.0.40.0810.35771.73
7.0.30.1370.61871.86
7.0.20.1820.40871.54
7.0.10.1260.58771.76
7.0.00.0850.43671.61
5.6.400.0820.63880.64
5.6.390.0880.56880.36
5.6.380.0730.62780.65
5.6.370.0500.54980.76
5.6.360.0930.57980.35
5.6.350.0980.65180.91
5.6.340.0830.55080.40
5.6.330.1050.55180.70
5.6.320.1090.71880.32
5.6.310.0790.59680.43
5.6.300.0760.49180.45
5.6.290.0890.59480.33
5.6.280.0730.52880.73
5.6.270.1040.60680.71
5.6.260.0920.59280.64
5.6.250.0830.66580.50
5.6.240.0660.53580.53
5.6.230.0910.58780.52
5.6.220.0830.51580.42
5.6.210.0820.51880.41
5.6.200.0660.50980.29
5.6.190.0690.53380.54
5.6.180.0640.51980.37
5.6.170.0880.71780.17
5.6.160.0850.54980.30
5.6.150.0800.53880.30
5.6.140.0760.56880.44
5.6.130.1060.55580.53
5.6.120.0640.57680.43
5.6.110.0460.56980.66
5.6.100.0630.59980.39
5.6.90.0570.53580.38
5.6.80.0620.51480.32
5.6.70.0600.57480.41
5.6.60.0920.56980.25
5.6.50.0560.53280.41
5.6.40.0760.56180.39
5.6.30.0690.52980.38
5.6.20.0690.53780.28
5.6.10.0900.89380.61
5.6.00.0820.58380.30
5.5.380.1190.62480.32
5.5.370.0730.66580.61
5.5.360.1220.65680.06
5.5.350.0900.59480.48
5.5.340.0920.61180.52
5.5.330.0860.63180.70
5.5.320.0740.55480.52
5.5.310.0550.64080.55
5.5.300.0630.74780.16
5.5.290.1130.91880.51
5.5.280.0620.63480.44
5.5.270.0780.55580.52
5.5.260.0570.61880.41
5.5.250.1130.63680.57
5.5.240.0670.55380.30
5.5.230.0890.68180.38
5.5.220.1020.85680.53
5.5.210.1020.52580.55
5.5.200.0910.57980.38
5.5.190.0890.60180.40
5.5.180.0890.64380.10
5.5.170.1500.76080.51
5.5.160.0830.71380.35
5.5.150.0560.63780.34
5.5.140.0730.70080.35
5.5.130.0780.73080.07
5.5.120.0750.64180.37
5.5.110.1050.79280.36
5.5.100.0990.64480.10
5.5.90.0590.54880.15
5.5.80.0570.61480.29
5.5.70.0760.69280.20
5.5.60.0990.56180.19
5.5.50.0900.55580.24
5.5.40.0750.59480.22
5.5.30.0660.60180.13
5.5.20.0610.56880.05
5.5.10.0730.57279.97
5.5.00.0620.57479.96
5.4.450.0850.69377.19
5.4.440.0660.54377.27
5.4.430.0800.56677.20
5.4.420.0900.57877.27
5.4.410.1000.59677.12
5.4.400.1060.56577.07
5.4.390.0930.60877.14
5.4.380.0730.55077.01
5.4.370.0800.57577.20
5.4.360.0830.56376.95
5.4.350.0590.54777.11
5.4.340.0860.57776.96
5.4.330.0840.79276.98
5.4.320.1080.62877.05
5.4.310.0820.76276.79
5.4.300.0900.68776.89
5.4.290.0820.59676.95
5.4.280.0970.71777.02
5.4.270.0980.65776.84
5.4.260.0660.67077.16
5.4.250.0940.66577.04
5.4.240.1030.70977.23
5.4.230.0760.79576.91
5.4.220.0660.53177.01
5.4.210.1070.62776.71
5.4.200.0730.54076.79
5.4.190.0780.60376.98
5.4.180.0930.54177.09
5.4.170.0720.54576.96
5.4.160.0600.55576.84
5.4.150.0700.65877.09
5.4.140.0620.59576.95
5.4.130.0720.72977.05
5.4.120.0890.57577.01
5.4.110.1030.61376.83
5.4.100.0730.59676.91
5.4.90.0600.57477.13
5.4.80.0920.63976.95
5.4.70.0670.60276.91
5.4.60.0690.58877.01
5.4.50.0850.60477.14
5.4.40.0730.58776.91
5.4.30.0960.54577.25
5.4.20.0620.61777.18
5.4.10.0600.65077.41
5.4.00.0690.58677.25
5.3.290.0890.61976.21
5.3.280.0860.55976.04
5.3.270.1050.73876.12
5.3.260.0690.62576.14
5.3.250.0950.76176.13
5.3.240.0790.62875.93
5.3.230.0690.72376.07
5.3.220.0750.73875.99
5.3.210.0860.86075.95
5.3.200.0880.64176.00
5.3.190.0590.68376.08
5.3.180.0790.72576.25
5.3.170.1030.67976.17
5.3.160.0880.71776.23
5.3.150.0920.79976.18
5.3.140.0660.64576.07
5.3.130.1000.69876.06
5.3.120.0840.61576.12
5.3.110.0620.71276.13
5.3.100.0730.63176.01
5.3.90.0660.66476.14
5.3.80.0850.60675.88
5.3.70.1100.64375.88
5.3.60.0660.99075.96
5.3.50.0880.84575.94
5.3.40.0730.74975.90
5.3.30.0790.61575.95
5.3.20.0960.76975.88
5.3.10.1141.08775.72
5.3.00.1160.80075.83
5.2.170.0780.78275.60
5.2.160.0990.77775.54
5.2.150.0700.79175.58
5.2.140.0730.71575.41
5.2.130.0670.70175.44
5.2.120.1090.88575.51
5.2.110.0820.84875.47
5.2.100.0860.88475.48
5.2.90.0850.76375.27
5.2.80.0990.73175.46
5.2.70.0760.72675.47
5.2.60.0760.79875.25
5.2.50.0700.78875.36
5.2.40.0680.82675.51
5.2.30.0650.91075.47
5.2.20.0920.75375.43
5.2.10.0890.74575.28
5.2.00.1942.301202.70
5.1.60.2932.187232.34
5.1.50.2712.226227.67
4.4.90.1942.285152.21
4.4.80.2152.265167.54
4.4.70.2652.226172.21
4.4.60.1872.299151.02
4.4.50.1812.258153.38

preferences:
35.55 ms | 401 KiB | 5 Q