3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file_name = 'whatever.zip'; $file_types = array("zip" => "Application/Octet-Stream"); $file_extension = pathinfo($file_name, PATHINFO_EXTENSION); echo $file_types[$file_extension]; // displays Application/Octet-Stream ?>

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.0040.01118.30
8.3.50.0110.00716.14
8.3.40.0100.01018.88
8.3.30.0080.00619.05
8.3.20.0040.00420.04
8.3.10.0000.00723.48
8.3.00.0060.00317.38
8.2.180.0090.00616.32
8.2.170.0090.00622.96
8.2.160.0070.00720.29
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00422.11
8.2.110.0060.00320.35
8.2.100.0060.00618.22
8.2.90.0070.00019.17
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0000.00818.16
8.2.50.0060.00318.07
8.2.40.0040.00419.93
8.2.30.0050.00318.18
8.2.20.0040.00417.79
8.2.10.0030.00518.04
8.2.00.0060.00319.44
8.1.270.0090.00923.97
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0030.00623.79
8.1.230.0060.00619.15
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0060.00317.23
8.1.190.0080.00016.98
8.1.180.0080.00018.10
8.1.170.0000.00918.59
8.1.160.0000.00821.99
8.1.150.0040.00418.73
8.1.140.0070.00017.38
8.1.130.0030.00317.81
8.1.120.0000.00717.41
8.1.110.0040.00417.37
8.1.100.0050.00217.30
8.1.90.0070.00017.41
8.1.80.0040.00417.45
8.1.70.0030.00317.33
8.1.60.0050.00317.39
8.1.50.0030.00617.36
8.1.40.0110.00017.36
8.1.30.0030.00517.59
8.1.20.0040.00417.61
8.1.10.0040.00417.57
8.1.00.0040.00417.57
8.0.300.0060.00318.77
8.0.290.0040.00416.63
8.0.280.0000.00718.48
8.0.270.0000.00717.28
8.0.260.0030.00317.24
8.0.250.0030.00416.86
8.0.240.0000.00816.97
8.0.230.0030.00316.77
8.0.220.0050.00216.79
8.0.210.0070.00016.84
8.0.200.0000.00816.87
8.0.190.0090.00016.91
8.0.180.0000.00716.82
8.0.170.0050.00316.79
8.0.160.0070.00016.84
8.0.150.0070.00016.84
8.0.140.0070.00316.65
8.0.130.0000.00613.25
8.0.120.0030.00616.79
8.0.110.0000.00716.82
8.0.100.0040.00416.79
8.0.90.0040.00416.70
8.0.80.0060.01516.79
8.0.70.0000.00816.78
8.0.60.0040.00416.64
8.0.50.0040.00416.76
8.0.30.0070.01017.10
8.0.20.0120.00717.40
8.0.10.0000.00716.77
8.0.00.0110.00616.70
7.4.330.0050.00015.09
7.4.320.0030.00316.54
7.4.300.0000.00616.55
7.4.290.0000.00816.54
7.4.280.0050.00216.53
7.4.270.0060.00016.55
7.4.260.0090.00016.51
7.4.250.0070.00016.54
7.4.240.0060.00216.53
7.4.230.0050.00216.51
7.4.220.0160.00616.46
7.4.210.0100.00616.57
7.4.200.0030.00316.28
7.4.160.0190.00416.39
7.4.150.0060.01217.40
7.4.140.0080.00817.86
7.4.130.0100.00916.66
7.4.120.0070.00916.41
7.4.110.0090.01216.67
7.4.100.0080.00816.65
7.4.90.0100.00916.46
7.4.80.0140.00319.39
7.4.70.0100.00616.46
7.4.60.0060.01016.48
7.4.50.0060.00016.23
7.4.40.0000.02416.34
7.4.30.0170.00016.45
7.4.00.0080.00814.79
7.3.330.0000.00612.94
7.3.320.0060.00013.18
7.3.310.0070.00016.33
7.3.300.0040.00416.05
7.3.290.0110.00416.19
7.3.280.0090.00816.20
7.3.270.0070.01517.40
7.3.260.0090.00616.28
7.3.250.0050.01116.28
7.3.240.0110.01116.31
7.3.230.0170.00016.39
7.3.210.0150.00716.46
7.3.200.0160.00819.39
7.3.190.0150.00616.40
7.3.180.0120.00916.50
7.3.170.0080.00816.33
7.3.160.0120.00816.18
7.3.10.0060.00616.59
7.3.00.0070.00316.79
7.2.330.0070.01016.75
7.2.320.0100.00716.70
7.2.310.0120.00916.66
7.2.300.0090.00616.71
7.2.290.0130.01016.66
7.2.130.0000.01116.77
7.2.120.0070.00416.99
7.2.110.0070.00316.77
7.2.100.0000.01116.65
7.2.90.0090.00616.59
7.2.80.0070.00717.07
7.2.70.0120.00416.96
7.2.60.0070.00716.80
7.2.50.0120.00616.73
7.2.40.0040.00416.87
7.2.30.0130.00016.70
7.2.20.0070.00716.84
7.2.10.0000.01116.73
7.2.00.0050.00518.05
7.1.250.0090.00615.92
7.1.100.0030.00618.25
7.1.70.0030.00717.30
7.1.60.0090.01619.32
7.1.50.0090.01216.94
7.1.00.0070.07322.31
7.0.200.0030.00616.88
7.0.140.0030.07322.04
7.0.60.0100.07020.05
7.0.50.0030.04717.80
7.0.40.0070.04319.98
7.0.30.0230.06320.00
7.0.20.0300.07720.16
7.0.10.0070.05320.18
7.0.00.0070.08320.08
5.6.280.0030.07320.78
5.6.210.0030.04320.76
5.6.200.0070.08318.16
5.6.190.0000.04720.41
5.6.180.0270.07720.33
5.6.170.0430.04320.46
5.6.160.0100.07020.37
5.6.150.0000.04318.15
5.6.140.0100.06318.17
5.6.130.0100.07718.21
5.6.120.0070.08020.92
5.6.110.0130.07720.98
5.6.100.0100.06721.01
5.6.90.0070.04721.07
5.6.80.0130.05320.43
5.5.350.0070.06020.43
5.5.340.0000.04017.93
5.5.330.0000.04320.33
5.5.320.0270.07020.31
5.5.310.0300.04320.34
5.5.300.0100.08017.89
5.5.290.0070.06717.90
5.5.280.0070.03720.79
5.5.270.0070.08720.65
5.5.260.0100.08720.71
5.5.250.0070.07020.77
5.5.240.0130.03320.28
5.4.450.1730.03719.39
5.4.440.2070.05019.39
5.4.430.2000.04019.13
5.4.420.1870.04319.38
5.4.410.1770.04019.10
5.4.400.1770.04318.89
5.4.390.0430.06019.10
5.4.380.0100.03718.90
5.4.370.0100.03719.13
5.4.360.0770.07319.09
5.4.350.1630.03719.24
5.4.340.1930.04719.21
5.4.320.1930.04018.88
5.4.310.2000.04019.09
5.4.300.1700.03719.21
5.4.290.2000.03019.13
5.4.280.1800.04719.08
5.4.270.2030.03718.77
5.4.260.1830.04319.09
5.4.250.1930.03719.12
5.4.240.0070.07319.13
5.4.230.0100.06719.07
5.4.220.0070.04018.89
5.4.210.1030.06019.24
5.4.200.1770.04719.09
5.4.190.1800.03719.11
5.4.180.1700.03318.92
5.4.170.1930.04018.76
5.4.160.1600.04318.91
5.4.150.1600.04319.15
5.4.140.1930.03716.17
5.4.130.1930.03016.26
5.4.120.1830.04316.43
5.4.110.1500.04016.39
5.4.100.1830.04316.48
5.4.90.2000.03716.39
5.4.80.1870.04016.51
5.4.70.1830.04716.37
5.4.60.1770.03716.43
5.4.50.1670.03716.18
5.4.40.1930.04016.36
5.4.30.1930.03716.19
5.4.20.1870.03716.45
5.4.10.1600.04016.31
5.4.00.1830.04015.79
5.3.290.0600.05714.64
5.3.280.0030.05714.60
5.3.270.0030.08014.54
5.3.260.0570.07314.67
5.3.250.1930.02714.64
5.3.240.2030.05014.55
5.3.230.2030.04714.43
5.3.220.1930.04314.41
5.3.210.1900.03314.50
5.3.200.1730.03714.50
5.3.190.1770.04014.42
5.3.180.1730.04014.39
5.3.170.1700.04014.40
5.3.160.1700.04014.49
5.3.150.1700.03714.54
5.3.140.1730.03714.40
5.3.130.1770.03014.49
5.3.120.1730.03314.49
5.3.110.1630.04014.59
5.3.100.1630.04314.02
5.3.90.1700.03713.89
5.3.80.1730.03714.00
5.3.70.1670.03713.89
5.3.60.1670.03713.78
5.3.50.1630.04013.78
5.3.40.1830.02313.88
5.3.30.1730.04313.68
5.3.20.1630.04013.71
5.3.10.1670.03713.46
5.3.00.1800.03713.60
5.2.170.1530.03011.00
5.2.160.1770.03311.19
5.2.150.1470.03011.00
5.2.140.1600.03710.98
5.2.130.1630.03011.11
5.2.120.1500.03711.04
5.2.110.1600.02711.14
5.2.100.0900.06011.04
5.2.90.0130.05310.96
5.2.80.0100.06010.95
5.2.70.0430.04011.14
5.2.60.0870.03010.88
5.2.50.1400.03311.06
5.2.40.1270.01711.02
5.2.30.1330.04010.90
5.2.20.1400.03310.97
5.2.10.1330.01310.79
5.2.00.1330.03310.68
5.1.60.1370.0279.93
5.1.50.1300.0379.96
5.1.40.1130.02310.13
5.1.30.1230.03310.41
5.1.20.1200.03010.41
5.1.10.1130.02710.04
5.1.00.1100.0279.99
5.0.50.0600.0178.51
5.0.40.0530.0208.41
5.0.30.0400.0338.41
5.0.20.0530.0208.41
5.0.10.0570.0208.41
5.0.00.0600.0278.41
4.4.90.0530.0178.41
4.4.80.0570.0138.41
4.4.70.0700.0138.41
4.4.60.0530.0178.41
4.4.50.0570.0138.41
4.4.40.0570.0238.41
4.4.30.0600.0108.41
4.4.20.0530.0178.41
4.4.10.0530.0178.41
4.4.00.0630.0178.41
4.3.110.0670.0208.41
4.3.100.0530.0178.41
4.3.90.0530.0178.41
4.3.80.0430.0238.41
4.3.70.0600.0108.41
4.3.60.0670.0178.41
4.3.50.0530.0178.41
4.3.40.0630.0178.41
4.3.30.0330.0178.41
4.3.20.0270.0178.41
4.3.10.0300.0208.41
4.3.00.0270.0138.41

preferences:
64.93 ms | 400 KiB | 5 Q