3v4l.org

run code in 300+ PHP versions simultaneously
<?php function collapse($path, $collapse, &$result) { foreach($collapse AS $key => $value) { if(is_array($value)) { collapse($path . $key . "/", $value, $result); continue; } $result[] = $path . $value; } } $result = array(); $toCollapse = array( "bla.tif", "quux.tif", array("foo" => array("bar" => array("lorem" => array("ipsum.tif", "doler.tif")))), array("bar" => array("qux" => array("baz" => array("ipsum.tif", "ufo.tif")))) ); collapse("", $toCollapse, $result); print_r($result);

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.40.0110.00418.54
8.3.30.0040.01119.09
8.3.20.0080.00020.20
8.3.10.0040.00423.70
8.3.00.0000.00820.71
8.2.170.0070.00722.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0080.00019.36
8.2.110.0050.00522.15
8.2.100.0080.00418.22
8.2.90.0050.00319.36
8.2.80.0030.00517.97
8.2.70.0030.00517.50
8.2.60.0030.00819.56
8.2.50.0040.00418.07
8.2.40.0080.00018.05
8.2.30.0000.00918.33
8.2.20.0040.00417.76
8.2.10.0040.00418.00
8.2.00.0030.00519.53
8.1.270.0040.00423.83
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0000.00821.80
8.1.230.0070.00419.18
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0090.00017.13
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0030.00518.46
8.1.160.0000.00721.93
8.1.150.0000.00718.64
8.1.140.0000.00817.46
8.1.130.0070.00017.75
8.1.120.0030.00617.40
8.1.110.0000.00817.36
8.1.100.0040.00417.50
8.1.90.0020.00517.50
8.1.80.0000.00917.47
8.1.70.0000.00717.41
8.1.60.0060.00317.55
8.1.50.0040.00417.52
8.1.40.0000.00817.58
8.1.30.0050.00317.51
8.1.20.0030.00617.61
8.1.10.0000.00717.48
8.1.00.0000.00817.38
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.44
8.0.270.0030.00317.26
8.0.260.0060.00017.25
8.0.250.0100.00016.88
8.0.240.0040.00416.97
8.0.230.0030.00316.90
8.0.220.0070.00016.95
8.0.210.0000.00816.84
8.0.200.0000.00617.00
8.0.190.0040.00416.83
8.0.180.0060.00316.76
8.0.170.0020.00516.75
8.0.160.0000.00716.86
8.0.150.0070.00016.97
8.0.140.0030.00316.85
8.0.130.0000.00913.27
8.0.120.0000.00716.92
8.0.110.0040.00416.88
8.0.100.0000.00716.96
8.0.90.0070.00016.89
8.0.80.0030.01216.84
8.0.70.0070.00016.93
8.0.60.0080.00016.70
8.0.50.0040.00416.71
8.0.30.0130.01017.05
8.0.20.0030.01817.40
8.0.10.0030.00517.01
8.0.00.0080.01016.95
7.4.330.0020.00215.09
7.4.320.0060.00016.59
7.4.300.0000.00616.43
7.4.290.0030.00316.52
7.4.280.0030.00316.55
7.4.270.0000.00716.64
7.4.260.0000.00716.59
7.4.250.0000.00816.48
7.4.240.0050.00216.48
7.4.230.0050.00316.63
7.4.220.0070.01716.71
7.4.210.0070.01116.65
7.4.200.0040.00416.51
7.4.160.0110.00616.54
7.4.150.0120.00617.40
7.4.140.0130.00517.86
7.4.130.0160.00816.47
7.4.120.0150.00516.46
7.4.110.0140.00316.56
7.4.100.0130.00316.55
7.4.90.0120.00616.48
7.4.80.0070.01619.39
7.4.70.0120.00616.44
7.4.60.0140.00316.36
7.4.50.0000.00916.49
7.4.40.0030.01616.55
7.4.30.0160.00616.42
7.4.10.0110.00714.95
7.4.00.0020.01414.97
7.3.330.0050.00013.09
7.3.320.0050.00013.11
7.3.310.0030.00316.21
7.3.300.0070.00016.18
7.3.290.0030.01016.33
7.3.280.0130.00516.29
7.3.270.0060.01217.40
7.3.260.0060.01116.50
7.3.250.0080.00816.58
7.3.240.0130.00316.48
7.3.230.0100.00716.57
7.3.210.0090.00916.66
7.3.200.0030.01319.39
7.3.190.0190.00316.51
7.3.180.0030.01316.34
7.3.170.0120.00616.65
7.3.160.0090.00616.40
7.3.130.0090.00614.78
7.3.120.0080.00815.08
7.3.110.0030.01214.96
7.3.100.0000.01114.55
7.3.90.0040.01214.84
7.3.80.0030.01414.98
7.3.70.0080.00415.01
7.3.60.0070.00314.81
7.3.50.0080.00514.56
7.3.40.0110.00015.05
7.3.30.0060.00914.56
7.3.20.0130.00616.79
7.3.10.0030.00916.41
7.3.00.0060.00616.84
7.2.330.0030.01316.43
7.2.320.0070.01016.71
7.2.310.0030.01716.72
7.2.300.0040.01216.74
7.2.290.0120.00316.62
7.2.260.0100.00615.12
7.2.250.0080.00815.06
7.2.240.0040.01114.80
7.2.230.0070.00715.04
7.2.220.0030.00914.96
7.2.210.0120.00415.20
7.2.200.0070.00714.98
7.2.190.0000.01414.96
7.2.180.0070.01015.02
7.2.170.0070.00715.19
7.2.160.0100.00814.70
7.2.150.0090.00916.99
7.2.140.0030.01217.06
7.2.130.0030.01017.01
7.2.120.0080.00416.87
7.2.110.0110.00416.69
7.2.100.0000.00916.96
7.2.90.0090.00616.98
7.2.80.0060.00816.96
7.2.70.0050.00516.94
7.2.60.0060.00317.09
7.2.50.0060.00516.94
7.2.40.0060.00617.00
7.2.30.0070.00716.75
7.2.20.0030.01316.71
7.2.10.0040.01416.68
7.2.00.0060.00617.86
7.1.330.0060.00615.84
7.1.320.0030.00715.85
7.1.310.0030.00715.62
7.1.300.0030.00915.82
7.1.290.0100.00615.73
7.1.280.0050.00815.91
7.1.270.0070.00415.68
7.1.260.0040.01115.87
7.1.250.0120.00315.78
7.1.240.0030.01115.50
7.1.230.0070.00315.75
7.1.220.0060.00615.47
7.1.210.0050.00515.81
7.1.200.0060.00615.82
7.1.190.0000.01415.89
7.1.180.0060.00315.79
7.1.170.0030.01015.54
7.1.160.0000.01015.82
7.1.150.0000.01015.98
7.1.140.0060.00615.68
7.1.130.0000.01715.72
7.1.120.0100.00315.88
7.1.110.0100.00315.80
7.1.100.0030.01016.93
7.1.90.0090.00315.70
7.1.80.0030.00915.54
7.1.70.0010.00816.42
7.1.60.0080.01017.71
7.1.50.0090.00816.42
7.1.40.0060.00915.66
7.1.30.0030.01015.53
7.1.20.0080.00415.80
7.1.10.0070.00715.90
7.1.00.0070.03919.16
7.0.330.0000.01115.13
7.0.320.0070.00715.32
7.0.310.0110.00415.22
7.0.300.0030.01015.15
7.0.290.0100.00315.28
7.0.280.0050.00515.60
7.0.270.0110.00315.36
7.0.260.0060.00915.40
7.0.250.0040.01115.54
7.0.240.0040.00815.25
7.0.230.0040.00815.51
7.0.220.0030.01015.39
7.0.210.0000.01615.47
7.0.200.0020.00916.08
7.0.190.0030.01015.19
7.0.180.0080.00815.48
7.0.170.0000.01015.19
7.0.160.0080.00815.39
7.0.150.0130.00015.61
7.0.140.0100.03318.73
7.0.130.0000.01315.41
7.0.120.0000.01415.39
7.0.110.0120.00315.48
7.0.100.0030.02717.57
7.0.90.0020.02817.75
7.0.80.0070.02217.76
7.0.70.0030.03017.61
7.0.60.0070.02017.71
7.0.50.0200.04618.08
7.0.40.0100.04316.80
7.0.30.0030.04516.81
7.0.20.0030.03016.69
7.0.10.0070.03516.73
7.0.00.0100.02216.75
5.6.400.0030.01014.45
5.6.390.0100.00714.64
5.6.380.0000.01214.62
5.6.370.0070.01014.75
5.6.360.0030.01014.36
5.6.350.0030.01014.63
5.6.340.0060.00614.68
5.6.330.0040.01114.52
5.6.320.0110.00314.38
5.6.310.0060.00614.65
5.6.300.0070.00714.51
5.6.290.0100.00014.38
5.6.280.0060.03917.69
5.6.270.0060.00914.47
5.6.260.0070.00714.36
5.6.250.0060.02617.45
5.6.240.0100.02017.49
5.6.230.0020.03417.54
5.6.220.0090.02117.37
5.6.210.0070.02117.58
5.6.200.0070.04517.76
5.6.190.0090.04017.82
5.6.180.0100.04017.64
5.6.170.0130.04317.76
5.6.160.0120.04117.76
5.6.150.0050.04317.77
5.6.140.0090.03417.92
5.6.130.0050.03517.87
5.6.120.0160.03617.89
5.6.110.0020.04817.75
5.6.100.0020.03417.84
5.6.90.0020.04917.82
5.6.80.0100.03717.42
5.6.70.0060.04317.35
5.6.60.0140.03817.30
5.6.50.0100.03817.33
5.6.40.0090.03617.35
5.6.30.0100.03717.23
5.6.20.0080.03717.43
5.6.10.0060.04517.36
5.6.00.0080.03817.34
5.5.380.0080.03117.52
5.5.370.0080.02017.49
5.5.360.0050.02517.32
5.5.350.0020.02717.44
5.5.340.0070.04517.51
5.5.330.0050.04417.54
5.5.320.0070.04517.60
5.5.310.0050.04217.69
5.5.300.0060.04017.53
5.5.290.0050.04717.59
5.5.280.0130.04017.55
5.5.270.0110.02217.70
5.5.260.0100.04117.82
5.5.250.0090.03717.62
5.5.240.0070.04017.08
5.5.230.0100.03617.15
5.5.220.0080.04517.42
5.5.210.0030.03117.29
5.5.200.0100.03817.33
5.5.190.0070.04517.37
5.5.180.0080.04017.31
5.5.170.0030.01214.52
5.5.160.0110.03617.22
5.5.150.0050.04217.32
5.5.140.0090.04017.37
5.5.130.0070.04217.30
5.5.120.0080.04317.32
5.5.110.0070.03517.19
5.5.100.0030.04617.05
5.5.90.0050.03417.28
5.5.80.0080.04317.27
5.5.70.0100.04017.21
5.5.60.0050.02317.19
5.5.50.0070.04517.12
5.5.40.0070.04517.15
5.5.30.0050.04417.07
5.5.20.0070.03717.07
5.5.10.0100.03817.07
5.5.00.0110.03817.07
5.4.450.0020.04515.27
5.4.440.0070.04315.18
5.4.430.0050.02315.47
5.4.420.0040.04015.15
5.4.410.0050.04415.32
5.4.400.0050.02515.20
5.4.390.0080.03915.19
5.4.380.0090.03915.24
5.4.370.0050.04315.00
5.4.360.0080.03815.07
5.4.350.0050.02615.13
5.4.340.0000.03115.06
5.4.330.0060.00611.11
5.4.320.0020.04615.21
5.4.310.0020.04315.11
5.4.300.0080.03915.18
5.4.290.0070.04015.19
5.4.280.0110.03914.99
5.4.270.0110.03615.16
5.4.260.0060.03815.14
5.4.250.0100.03715.11
5.4.240.0050.04315.17
5.4.230.0050.03615.10
5.4.220.0100.03815.09
5.4.210.0050.04315.18
5.4.200.0080.03815.16
5.4.190.0070.03815.14
5.4.180.0110.03515.12
5.4.170.0050.04315.18
5.4.160.0050.04115.06
5.4.150.0000.04615.20
5.4.140.0070.04113.81
5.4.130.0090.03313.97
5.4.120.0050.03713.83
5.4.110.0050.04213.69
5.4.100.0030.04113.80
5.4.90.0060.04113.76
5.4.80.0060.03413.68
5.4.70.0070.03613.92
5.4.60.0090.03313.63
5.4.50.0050.04213.93
5.4.40.0070.03713.80
5.4.30.0070.04013.82
5.4.20.0080.04013.88
5.4.10.0140.03313.90
5.4.00.0090.03513.54
5.3.290.0060.03712.74
5.3.280.0030.04112.45
5.3.270.0120.01912.66
5.3.260.0070.02512.76
5.3.250.0030.03512.72
5.3.240.0070.04012.60
5.3.230.0020.02912.65
5.3.220.0120.03512.59
5.3.210.0050.04212.48
5.3.200.0020.04312.41
5.3.190.0050.04212.59
5.3.180.0030.02612.63
5.3.170.0050.03612.60
5.3.160.0080.03612.78
5.3.150.0070.03812.67
5.3.140.0070.04012.65
5.3.130.0060.03812.65
5.3.120.0070.04212.63
5.3.110.0060.04112.65
5.3.100.0030.04112.45
5.3.90.0030.04312.35
5.3.80.0080.03812.18
5.3.70.0070.04312.27
5.3.60.0050.03812.29
5.3.50.0070.03912.19
5.3.40.0090.03612.22
5.3.30.0060.02312.31
5.3.20.0070.03212.11
5.3.10.0070.02712.05
5.3.00.0070.03711.96
5.2.170.0100.05311.23
5.2.160.0030.06311.24
5.2.150.0070.06011.24
5.2.140.0030.06311.28
5.2.130.0070.06311.23
5.2.120.0030.06011.23
5.2.110.0030.06711.23
5.2.100.0030.06311.23
5.2.90.0100.06011.23
5.2.80.0070.06711.23
5.2.70.0100.06311.23
5.2.60.0030.06311.23
5.2.50.0000.06311.23
5.2.40.0130.05711.23
5.2.30.0170.05011.23
5.2.20.0070.06011.23
5.2.10.0030.06311.23
5.2.00.0070.06011.23
5.1.60.0030.05311.23
5.1.50.0070.05711.23
5.1.40.0070.04011.23
5.1.30.0030.05711.23
5.1.20.0070.04011.23
5.1.10.0100.05311.23
5.1.00.0000.05011.23
5.0.50.0030.04711.23
5.0.40.0000.04711.23
5.0.30.0070.06311.23
5.0.20.0030.04311.23
5.0.10.0030.04311.23
5.0.00.0070.06011.23
4.4.90.0000.04011.23
4.4.80.0070.03011.23
4.4.70.0030.03311.23
4.4.60.0000.03311.23
4.4.50.0030.03311.23
4.4.40.0030.05711.23
4.4.30.0030.03011.23
4.4.20.0030.03311.23
4.4.10.0000.02311.23
4.4.00.0070.04711.23
4.3.110.0070.03011.23
4.3.100.0000.03711.23
4.3.90.0000.03311.23
4.3.80.0100.05011.23
4.3.70.0000.03711.23
4.3.60.0070.03011.23
4.3.50.0030.02311.23
4.3.40.0000.05311.23
4.3.30.0070.03011.23
4.3.20.0030.03711.23
4.3.10.0070.03011.23
4.3.00.0000.03711.23

preferences:
44.97 ms | 400 KiB | 5 Q