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[] = $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.60.0100.01018.21
8.3.50.0110.00622.01
8.3.40.0110.00418.70
8.3.30.0080.00819.04
8.3.20.0040.00420.33
8.3.10.0030.00623.51
8.3.00.0040.00420.77
8.2.180.0130.00918.16
8.2.170.0110.00422.96
8.2.160.0090.00620.38
8.2.150.0070.00024.18
8.2.140.0000.00924.66
8.2.130.0030.00626.16
8.2.120.0090.00019.19
8.2.110.0100.00021.95
8.2.100.0040.00818.09
8.2.90.0080.00019.14
8.2.80.0050.00317.97
8.2.70.0050.00317.75
8.2.60.0110.00017.80
8.2.50.0080.00018.07
8.2.40.0070.00018.16
8.2.30.0000.00818.36
8.2.20.0040.00417.72
8.2.10.0000.00718.04
8.2.00.0050.00319.40
8.1.280.0100.01025.92
8.1.270.0090.00023.66
8.1.260.0050.00226.35
8.1.250.0050.00328.09
8.1.240.0070.00322.24
8.1.230.0080.00419.21
8.1.220.0000.00817.79
8.1.210.0000.00918.77
8.1.200.0060.00317.25
8.1.190.0040.00417.10
8.1.180.0050.00318.10
8.1.170.0050.00318.66
8.1.160.0000.00721.89
8.1.150.0040.00418.63
8.1.140.0000.00717.31
8.1.130.0000.00717.71
8.1.120.0030.00617.41
8.1.110.0040.00417.38
8.1.100.0040.00417.36
8.1.90.0030.00317.35
8.1.80.0100.00017.47
8.1.70.0030.00317.36
8.1.60.0030.00617.60
8.1.50.0040.00417.53
8.1.40.0050.00317.50
8.1.30.0000.00917.70
8.1.20.0040.00417.55
8.1.10.0030.00617.48
8.1.00.0000.00817.35
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.37
8.0.270.0000.00917.27
8.0.260.0060.00017.19
8.0.250.0040.00416.94
8.0.240.0000.00716.88
8.0.230.0030.00316.88
8.0.220.0030.00316.82
8.0.210.0060.00316.94
8.0.200.0000.00616.88
8.0.190.0050.00316.99
8.0.180.0060.00316.86
8.0.170.0040.00416.93
8.0.160.0030.00316.84
8.0.150.0000.00716.75
8.0.140.0000.00716.93
8.0.130.0020.00513.29
8.0.120.0040.00416.77
8.0.110.0000.00716.86
8.0.100.0070.00016.70
8.0.90.0040.00416.94
8.0.80.0070.01416.89
8.0.70.0040.00416.85
8.0.60.0000.00816.77
8.0.50.0040.00416.90
8.0.30.0100.01217.29
8.0.20.0120.00817.40
8.0.10.0000.00917.05
8.0.00.0040.01316.71
7.4.330.0020.00215.06
7.4.320.0060.00016.57
7.4.300.0060.00016.60
7.4.290.0070.00016.63
7.4.280.0000.00816.68
7.4.270.0000.00816.53
7.4.260.0070.00016.48
7.4.250.0040.00416.43
7.4.240.0020.00516.55
7.4.230.0090.00016.71
7.4.220.0140.00316.48
7.4.210.0120.00916.68
7.4.200.0030.00416.64
7.4.160.0060.01016.64
7.4.150.0080.00817.40
7.4.140.0120.00717.86
7.4.130.0120.01116.64
7.4.120.0110.01016.53
7.4.110.0040.01416.41
7.4.100.0080.00816.65
7.4.90.0100.00716.64
7.4.80.0090.00919.39
7.4.70.0030.01416.52
7.4.60.0060.01616.58
7.4.50.0030.00616.36
7.4.40.0130.00316.37
7.4.30.0070.01416.54
7.4.00.0090.00615.07
7.3.330.0000.00613.17
7.3.320.0060.00013.38
7.3.310.0020.00516.29
7.3.300.0070.00016.31
7.3.290.0110.00416.37
7.3.280.0080.01216.29
7.3.270.0170.00017.40
7.3.260.0150.00316.64
7.3.250.0130.00516.44
7.3.240.0030.01316.45
7.3.230.0110.00716.64
7.3.210.0080.00916.55
7.3.200.0090.00919.39
7.3.190.0130.00616.54
7.3.180.0120.00416.35
7.3.170.0040.01216.38
7.3.160.0130.00316.57
7.3.120.0090.00615.13
7.3.110.0040.01114.97
7.3.100.0030.00914.58
7.3.90.0030.00715.13
7.3.80.0110.00414.71
7.3.70.0040.01114.74
7.3.60.0060.00614.70
7.3.50.0070.00714.89
7.3.40.0060.00914.41
7.3.30.0070.00814.65
7.3.20.0000.01516.55
7.3.10.0080.00516.75
7.3.00.0080.00816.59
7.2.330.0030.01316.67
7.2.320.0100.00716.87
7.2.310.0110.01116.74
7.2.300.0100.00716.84
7.2.290.0100.00716.74
7.2.240.0060.00915.35
7.2.230.0030.01014.84
7.2.220.0030.00615.05
7.2.210.0060.00614.91
7.2.200.0070.01015.10
7.2.190.0080.00415.04
7.2.180.0100.00715.04
7.2.170.0060.00614.72
7.2.160.0000.01514.70
7.2.150.0030.01616.85
7.2.140.0030.01016.61
7.2.130.0080.00516.92
7.2.120.0060.00916.81
7.2.110.0040.01116.82
7.2.100.0060.00616.71
7.2.90.0060.00716.94
7.2.80.0080.00716.91
7.2.70.0080.00316.86
7.2.60.0090.00716.85
7.2.50.0040.00917.04
7.2.40.0050.01016.91
7.2.30.0080.00716.90
7.2.20.0040.00716.64
7.2.10.0050.00716.94
7.2.00.0080.00517.65
7.1.330.0040.00815.38
7.1.320.0030.01015.73
7.1.310.0060.00615.86
7.1.300.0090.00015.73
7.1.290.0030.00615.74
7.1.280.0070.00715.75
7.1.270.0070.00315.66
7.1.260.0100.00316.02
7.1.250.0060.00615.75
7.1.100.0060.00617.99
7.1.70.0030.00317.15
7.1.60.0030.01319.70
7.1.50.0060.01516.99
7.1.00.0100.07022.27
7.0.200.0040.00416.79
7.0.140.0070.07022.15
7.0.110.0200.07720.02
7.0.100.0030.09320.07
7.0.90.0070.07019.87
7.0.80.0070.05020.05
7.0.70.0130.08020.05
7.0.60.0100.05319.92
7.0.50.0130.08020.00
7.0.40.0070.08719.88
7.0.30.0100.05719.74
7.0.20.0200.07019.78
7.0.10.0230.06319.74
7.0.00.0070.07319.72
5.6.280.0070.07320.78
5.6.260.0100.06020.60
5.6.250.0100.07720.61
5.6.240.0100.08020.61
5.6.230.0170.07320.71
5.6.220.0100.08320.68
5.6.210.0100.07320.61
5.6.200.0070.08020.62
5.6.190.0070.08320.66
5.6.180.0130.07320.64
5.6.170.0100.07720.64
5.6.160.0000.09020.66
5.6.150.0170.07320.66
5.6.140.0100.07720.65
5.6.130.0030.05020.63
5.6.120.0070.07720.64
5.6.110.0100.07320.57
5.6.100.0130.06720.46
5.6.90.0100.07320.69
5.6.80.0030.08320.02
5.6.70.0130.06720.03
5.6.60.0070.08020.06
5.6.50.0130.06720.01
5.6.40.0070.05319.93
5.6.30.0100.08019.93
5.6.20.0070.07719.97
5.6.10.0070.07019.87
5.6.00.0030.08019.98
5.5.380.0130.07320.48
5.5.370.0100.07320.45
5.5.360.0100.08320.51
5.5.350.0030.07320.38
5.5.340.0030.08320.91
5.5.330.0170.07020.96
5.5.320.0030.08020.92
5.5.310.0100.08320.90
5.5.300.0070.05720.90
5.5.290.0000.08020.74
5.5.280.0070.08020.97
5.5.270.0000.08720.89
5.5.260.0070.05320.66
5.5.250.0070.08320.65
5.5.240.0100.07020.23
5.5.230.0100.08320.16
5.5.220.0130.06720.14
5.5.210.0000.07720.35
5.5.200.0130.07320.20
5.5.190.0030.05020.30
5.5.180.0070.07720.25
5.5.160.0030.05720.16
5.5.150.0130.07020.32
5.5.140.0100.05320.26
5.5.130.0070.08320.19
5.5.120.0030.08320.32
5.5.110.0130.07020.36
5.5.100.0200.06320.23
5.5.90.0030.08020.08
5.5.80.0070.07020.20
5.5.70.0030.06320.20
5.5.60.0070.07720.07
5.5.50.0100.04320.20
5.5.40.0130.08020.16
5.5.30.0070.07720.23
5.5.20.0000.08020.22
5.5.10.0130.06720.02
5.5.00.0070.07020.03
5.4.450.0130.07719.33
5.4.440.0100.07719.67
5.4.430.0070.08019.30
5.4.420.0030.07719.63
5.4.410.0130.07019.23
5.4.400.0030.08019.01
5.4.390.0070.07719.00
5.4.380.0170.07018.98
5.4.370.0070.07019.23
5.4.360.0030.08019.02
5.4.350.0100.07318.95
5.4.340.0100.03719.23
5.4.320.0030.08319.19
5.4.310.0070.07718.97
5.4.300.0030.07718.96
5.4.290.0070.07719.14
5.4.280.0070.08019.01
5.4.270.0070.07719.22
5.4.260.0030.08019.03
5.4.250.0100.07319.13
5.4.240.0230.06319.30
5.4.230.0030.07718.98
5.4.220.0070.07719.03
5.4.210.0100.08018.94
5.4.200.0100.07719.31
5.4.190.0130.07019.00
5.4.180.0030.07319.02
5.4.170.0070.07319.00
5.4.160.0030.08719.07
5.4.150.0130.07018.94
5.4.140.0200.06016.51
5.4.130.0070.07016.59
5.4.120.0070.05016.39
5.4.110.0200.05316.65
5.4.100.0130.07016.57
5.4.90.0100.06716.42
5.4.80.0100.07316.54
5.4.70.0000.05016.45
5.4.60.0100.06016.55
5.4.50.0100.05316.45
5.4.40.0170.03016.60
5.4.30.0070.07316.28
5.4.20.0030.07716.54
5.4.10.0100.07016.52
5.4.00.0070.07015.91
5.3.290.0030.08014.68
5.3.280.0030.07314.73
5.3.270.0030.08014.46
5.3.260.0100.07014.61
5.3.250.0070.08014.46
5.3.240.0070.07714.61
5.3.230.0100.07314.74
5.3.220.0130.07314.58
5.3.210.0030.07014.56
5.3.200.0070.07714.69
5.3.190.0100.07314.58
5.3.180.0030.04714.58
5.3.170.0130.05714.58
5.3.160.0030.07314.42
5.3.150.0030.07714.59
5.3.140.0030.04314.66
5.3.130.0130.04714.55
5.3.120.0100.05314.56
5.3.110.0070.07314.51
5.3.100.0070.04014.06
5.3.90.0100.04314.11
5.3.80.0030.03714.08
5.3.70.0000.04014.00
5.3.60.0000.04313.99
5.3.50.0000.04014.03
5.3.40.0100.03013.94
5.3.30.0000.03713.76
5.3.20.0070.03713.65
5.3.10.0030.03313.51
5.3.00.0070.03013.50
5.2.170.0130.02011.93
5.2.160.0000.03011.93
5.2.150.0030.03311.93
5.2.140.0100.02311.93
5.2.130.0000.03011.93
5.2.120.0030.02711.93
5.2.110.0000.03011.93
5.2.100.0000.03011.93
5.2.90.0070.02711.93
5.2.80.0030.02711.93
5.2.70.0030.03311.93
5.2.60.0000.03711.93
5.2.50.0000.05711.93
5.2.40.0130.05011.93
5.2.30.0030.02711.93
5.2.20.0000.03011.93
5.2.10.0000.05711.93
5.2.00.0070.04311.93
5.1.60.0000.02711.93
5.1.50.0070.01711.93
5.1.40.0000.02311.93
5.1.30.0070.05011.93
5.1.20.0000.03311.93
5.1.10.0000.04011.93
5.1.00.0030.03711.93
5.0.50.0000.02311.93
5.0.40.0030.01711.93
5.0.30.0000.03011.93
5.0.20.0000.02011.93
5.0.10.0000.02011.93
5.0.00.0000.03011.93
4.4.90.0000.01711.93
4.4.80.0000.01711.93
4.4.70.0030.01311.93
4.4.60.0030.01711.93
4.4.50.0030.02011.93
4.4.40.0000.03711.93
4.4.30.0000.01711.93
4.4.20.0000.03311.93
4.4.10.0000.01311.93
4.4.00.0000.02311.93
4.3.110.0000.01711.93
4.3.100.0000.01311.93
4.3.90.0070.01011.93
4.3.80.0000.03011.93
4.3.70.0000.01711.93
4.3.60.0030.01311.93
4.3.50.0000.01711.93
4.3.40.0070.01711.93
4.3.30.0030.01711.93
4.3.20.0000.01311.93
4.3.10.0000.01711.93
4.3.00.0000.03311.93

preferences:
43.39 ms | 401 KiB | 5 Q