3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar { public function baz() { return strlen('Regarding the overhead: Just keep in mind, that a typical application calls built-in functions many thousand times. Even if the difference is small: It exists.'); } } $start = microtime(true); $foo = new Foo\Bar; for($x = 0; $x < 1000000; $x++) { $foo->baz(); } echo "Time: " . round((microtime(true) - $start ) / 1000000, 5) . 's'; }

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.0.110.0040.00416.73
8.0.100.0040.00416.86
8.0.90.0070.00016.92
8.0.80.0060.00916.77
8.0.70.0050.00216.70
8.0.60.0050.00216.77
8.0.50.0050.00316.83
8.0.30.0100.01216.89
8.0.20.0100.01017.14
8.0.10.0000.00716.95
8.0.00.0060.01516.67
7.4.240.0040.00416.57
7.4.230.0070.00016.39
7.4.220.0060.01416.51
7.4.210.0070.01016.60
7.4.200.0070.00016.49
7.4.190.0070.00016.71
7.4.160.0060.01216.32
7.4.150.0180.00017.07
7.4.140.0110.01017.10
7.4.130.0120.00516.42
7.4.120.0090.00916.51
7.4.110.0180.00316.64
7.4.100.0070.01016.30
7.4.90.0070.01016.54
7.4.80.0070.01018.80
7.4.70.0120.00616.43
7.4.60.0090.00616.51
7.4.50.0000.00816.49
7.4.40.0070.00722.27
7.4.30.0130.00316.23
7.4.00.0080.01114.97
7.3.300.0030.00316.21
7.3.290.0180.00016.29
7.3.280.0050.01116.28
7.3.270.0060.01217.07
7.3.260.0090.01418.24
7.3.250.0130.00616.53
7.3.240.0060.01316.39
7.3.230.0100.00616.39
7.3.210.0040.01516.48
7.3.200.0190.00019.39
7.3.190.0150.00316.55
7.3.180.0070.01016.47
7.3.170.0050.01016.39
7.3.160.0100.01016.48
7.3.120.0110.00514.88
7.3.110.0030.01415.05
7.3.100.0030.01014.71
7.3.90.0070.00714.81
7.3.80.0040.00414.55
7.3.70.0100.00314.64
7.3.60.0000.01514.77
7.3.50.0060.00614.73
7.3.40.0060.00314.71
7.3.30.0070.00714.79
7.3.20.0040.01416.67
7.3.10.0030.00916.45
7.3.00.0100.00216.55
7.2.330.0120.00616.67
7.2.320.0090.01316.46
7.2.310.0110.00816.66
7.2.300.0100.00616.53
7.2.290.0060.00916.36
7.2.250.0100.01014.98
7.2.240.0000.01914.92
7.2.230.0110.00315.16
7.2.220.0080.00815.18
7.2.210.0030.00615.01
7.2.200.0030.01115.07
7.2.190.0040.00814.68
7.2.180.0090.00015.13
7.2.170.0000.01414.91
7.2.130.0070.01016.82
7.2.120.0080.00416.76
7.2.110.0140.00316.60
7.2.100.0090.00616.83
7.2.90.0060.00916.93
7.2.80.0040.01216.66
7.2.70.0130.00316.90
7.2.60.0090.00316.86
7.2.50.0000.01316.84
7.2.40.0050.00516.61
7.2.30.0030.01016.91
7.2.20.0000.01316.59
7.2.10.0070.00416.82
7.2.00.0050.01218.08
7.1.330.0030.01015.45
7.1.320.0000.01415.79
7.1.310.0070.00715.85
7.1.300.0070.00715.69
7.1.290.0040.01115.52
7.1.280.0030.01015.78
7.1.270.0000.01115.46
7.1.260.0030.01015.75
7.1.250.0080.00515.42
7.1.200.0170.00715.17
7.1.100.0030.01017.90
7.1.70.0030.00517.05
7.1.60.0190.00619.40
7.1.50.0070.01716.52
7.1.00.0030.07322.43
7.0.200.0030.00616.66
7.0.140.0070.07021.99
7.0.60.0030.04019.96
7.0.50.0030.07017.88
7.0.40.0100.04020.22
7.0.30.0200.04320.08
7.0.20.0270.05320.19
7.0.10.0130.04320.37
7.0.00.0070.08720.12
5.6.280.0030.07021.14
5.6.210.0100.06320.70
5.6.200.0070.08718.18
5.6.190.0100.04320.32
5.6.180.0200.04320.60
5.6.170.0270.08020.58
5.6.160.0070.05320.49
5.6.150.0070.08018.19
5.6.140.0070.05018.18
5.6.130.0000.04718.27
5.6.120.0070.05021.02
5.6.110.0070.08320.89
5.6.100.0000.04721.11
5.6.90.0030.08320.95
5.6.80.0100.07720.51
5.6.70.4500.04020.37
5.5.350.0270.08320.40
5.5.340.0100.07317.92
5.5.330.0030.05720.38
5.5.320.0370.06720.44
5.5.310.0300.05020.23
5.5.300.0100.07017.98
5.5.290.0070.08318.01
5.5.280.0030.04720.75
5.5.270.0100.07720.87
5.5.260.0070.07720.87
5.5.250.0130.04020.62
5.5.240.0100.08020.36
5.4.450.1670.04319.57
5.4.440.1500.04319.55
5.4.430.1470.04319.56
5.4.420.1900.03019.39
5.4.410.1770.05319.42
5.4.400.1600.04319.05
5.4.390.1700.04718.86
5.4.380.1570.03719.16
5.4.370.1700.04018.88
5.4.360.0030.03718.88
5.4.350.0070.04318.87
5.4.340.0800.05319.07
5.4.320.1730.05018.99
5.4.310.1830.04019.00
5.4.300.1900.04319.24
5.4.290.1730.04319.00
5.4.280.1630.04319.24
5.4.270.1730.05019.20
5.4.260.1870.05319.14
5.4.250.1530.04319.05
5.4.240.1930.04019.23
5.4.230.1770.04718.88
5.4.220.0630.04019.17
5.4.210.0130.06019.13
5.4.200.0030.03719.05
5.4.190.1630.04019.03
5.4.180.1870.04719.07
5.4.170.1900.04718.88
5.4.160.1800.04719.06
5.4.150.1600.04319.17
5.4.140.1970.04016.67
5.4.130.1870.04016.50
5.4.120.1670.03716.66
5.4.110.1600.03316.29
5.4.100.1800.04716.37
5.4.90.1230.04016.35
5.4.80.0030.03316.26
5.4.70.0030.04316.54
5.4.60.0730.04316.54
5.4.50.2000.04316.22
5.4.40.1700.03716.51
5.4.30.1900.04716.51
5.4.20.1530.04316.55
5.4.10.1930.04316.54
5.4.00.1930.04015.95
5.3.290.1900.04014.74
5.3.280.1630.03714.65
5.3.270.1700.03014.69
5.3.260.1670.03314.69
5.3.250.0870.03714.51
5.3.240.0030.03714.51
5.3.230.0100.03314.68
5.3.220.1400.03014.57
5.3.210.1630.03314.68
5.3.200.1600.03714.46
5.3.190.1570.04014.64
5.3.180.1700.03714.71
5.3.170.1670.03314.61
5.3.160.1570.03314.47
5.3.150.1700.03714.58
5.3.140.1700.03314.45
5.3.130.1670.03314.46
5.3.120.1630.03714.65
5.3.110.1470.04014.63
5.3.100.0870.03713.91
5.3.90.0030.03314.10
5.3.80.0000.04013.93
5.3.70.1100.04014.10
5.3.60.1400.03314.05
5.3.50.1830.03714.17
5.3.40.1630.03714.17
5.3.30.1400.03713.98
5.3.20.1570.03013.74
5.3.10.1330.03713.55
5.3.00.1330.04013.70
5.2.170.1430.03311.00
5.2.160.1130.03310.98
5.2.150.1130.03011.00
5.2.140.1230.03011.15
5.2.130.1230.03310.95
5.2.120.1030.03011.11
5.2.110.0030.02711.11
5.2.100.0070.02710.95
5.2.90.0000.03010.96
5.2.80.1300.03011.00
5.2.70.1370.03310.93
5.2.60.1070.03010.92
5.2.50.1400.03010.85
5.2.40.0870.03011.14
5.2.30.1030.02711.05
5.2.20.1070.02710.97
5.2.10.0370.02710.71
5.2.00.0000.03010.68
5.1.60.0070.0279.87
5.1.50.0000.02710.16
5.1.40.0400.02710.10
5.1.30.0900.02310.50
5.1.20.1070.02310.26
5.1.10.1030.0279.98
5.1.00.1270.02310.14
5.0.50.0500.0208.68
5.0.40.0630.0178.34
5.0.30.0670.0408.30
5.0.20.0500.0208.25
5.0.10.0330.0378.32
5.0.00.0000.0678.04
4.4.90.0000.0377.27
4.4.80.0000.0307.27
4.4.70.0030.0177.27
4.4.60.0000.0277.27
4.4.50.0070.0137.27
4.4.40.0000.0437.27
4.4.30.0030.0277.27
4.4.20.0500.0177.27
4.4.10.0270.0177.27
4.4.00.0500.0307.27
4.3.110.0600.0107.27
4.3.100.0630.0107.27
4.3.90.0600.0237.27
4.3.80.0500.0277.27
4.3.70.0730.0207.27
4.3.60.0530.0137.27
4.3.50.0670.0207.27
4.3.40.0530.0237.27
4.3.30.0300.0177.27
4.3.20.0300.0207.27
4.3.10.0330.0337.27
4.3.00.0300.0177.27

preferences:
38.38 ms | 400 KiB | 5 Q