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 Bar; for($x = 0; $x < 1000000; $x++) { $foo->baz(); } echo "Time: " . number_format((microtime(true) - $start) * 1000, 2, ""," ") . ' ms'; }

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.0030.04217.01
8.0.100.0000.04416.83
8.0.90.0030.04116.96
8.0.80.0030.05416.98
8.0.70.0000.04416.97
8.0.60.0060.03816.88
8.0.50.0030.04116.80
8.0.30.0100.05017.17
8.0.20.0090.05317.40
8.0.10.0000.04617.00
8.0.00.0050.05816.76
7.4.240.0020.04516.59
7.4.230.0030.04316.56
7.4.220.0030.10616.63
7.4.210.0090.05516.67
7.4.200.0040.04316.67
7.4.190.0070.03916.82
7.4.160.0120.05416.56
7.4.150.0160.04817.40
7.4.140.0080.05817.86
7.4.130.0110.05316.54
7.4.120.0110.07116.63
7.4.110.0060.05616.63
7.4.100.0140.05116.48
7.4.90.0100.06216.40
7.4.80.0000.06319.39
7.4.70.0030.05916.51
7.4.60.0150.05916.71
7.4.50.0030.05616.56
7.4.40.0070.04622.77
7.4.30.0080.08316.69
7.4.00.0070.04614.99
7.3.300.0030.04516.24
7.3.290.0000.06316.37
7.3.280.0120.06816.34
7.3.270.0070.06417.40
7.3.260.0070.06216.43
7.3.250.0070.06316.49
7.3.240.0170.05016.45
7.3.230.0100.05616.39
7.3.210.0060.08016.55
7.3.200.0070.06419.39
7.3.190.0090.05916.71
7.3.180.0120.06116.48
7.3.170.0100.05516.49
7.3.160.0070.08916.72
7.3.120.0070.04914.86
7.3.10.0170.05716.40
7.3.00.0130.07016.55
7.2.330.0180.06216.88
7.2.320.0100.06916.84
7.2.310.0070.06316.70
7.2.300.0130.05516.48
7.2.290.0060.06416.58
7.2.130.0130.05416.73
7.2.120.0130.04716.59
7.2.110.0030.06816.51
7.2.100.0030.05916.59
7.2.90.0130.05216.70
7.2.80.0030.06616.64
7.2.70.0160.04916.75
7.2.60.0130.04916.70
7.2.50.0100.05416.52
7.2.40.0070.06317.03
7.2.30.0100.04417.04
7.2.20.0040.05617.08
7.2.10.0130.04717.10
7.2.00.0020.06418.12
7.1.250.0030.12615.73
7.1.200.0030.05115.83
7.1.100.0000.05218.25
7.1.70.0100.05116.93
7.1.60.0070.09719.32
7.1.50.0100.09617.01
7.1.00.0000.07322.27
7.0.200.0030.04716.62
7.0.140.0100.13322.09
7.0.100.0300.12320.05
7.0.90.0100.10019.92
7.0.80.0230.11719.89
7.0.70.0100.10019.88
7.0.60.0270.12320.03
7.0.50.0070.13720.28
7.0.40.0030.08020.03
7.0.30.0030.12020.06
7.0.20.0070.12320.13
7.0.10.0100.13720.12
7.0.00.0130.13020.17
5.6.280.0000.27321.10
5.6.250.0100.20320.68
5.6.240.0100.22020.62
5.6.230.0070.22320.64
5.6.220.0100.22720.54
5.6.210.0030.23320.57
5.6.200.0130.23721.03
5.6.190.0000.24721.05
5.6.180.0030.26320.94
5.6.170.0130.22321.18
5.6.160.0170.30021.07
5.6.150.0100.29721.05
5.6.140.0030.20721.09
5.6.130.0130.23321.14
5.6.120.0230.23321.05
5.6.110.0070.22321.08
5.6.100.0070.23321.13
5.6.90.0070.21721.03
5.6.80.0070.20720.34
5.6.70.0070.22020.49
5.6.60.0070.26320.39
5.6.50.0070.26020.50
5.6.40.0100.22320.38
5.6.30.0030.24720.39
5.6.20.0030.23720.38
5.6.10.0130.22320.41
5.6.00.0230.21020.38
5.5.380.0070.23320.37
5.5.370.0070.22020.35
5.5.360.0100.21320.50
5.5.350.0030.19720.39
5.5.340.0070.25720.82
5.5.330.0030.18720.75
5.5.320.0100.23020.77
5.5.310.0070.23720.90
5.5.300.0030.21320.91
5.5.290.0100.21320.89
5.5.280.0030.22020.77
5.5.270.0000.26020.90
5.5.260.0200.19320.89
5.5.250.0070.23320.62
5.5.240.0070.23720.04
5.5.230.0030.20020.29
5.5.220.0070.21320.26
5.5.210.0030.23320.16
5.5.200.0100.22720.28
5.5.190.0100.20320.13
5.5.180.0070.26020.00
5.5.160.0070.23320.18
5.5.150.0070.25320.18
5.5.140.0130.19020.23
5.5.130.0200.19720.11
5.5.120.0170.21320.26
5.5.110.0170.26320.17
5.5.100.0100.20320.14
5.5.90.0100.28020.10
5.5.80.0170.28019.95
5.5.70.0100.24720.04
5.5.60.0100.23320.02
5.5.50.0130.23020.06
5.5.40.0000.18720.16
5.5.30.0200.21320.10
5.5.20.0070.24020.09
5.5.10.0100.22720.13
5.5.00.0270.22320.07
5.4.450.0030.19319.30
5.4.440.0070.24019.54
5.4.430.0100.23319.23
5.4.420.0030.23319.52
5.4.410.0030.27019.34
5.4.400.0030.20718.96
5.4.390.0100.25019.11
5.4.380.0070.22019.11
5.4.370.0030.23319.11
5.4.360.0100.20018.91
5.4.350.0100.22719.18
5.4.340.0000.18319.02
5.4.320.0030.19718.96
5.4.310.0030.20719.11
5.4.300.0130.22019.10
5.4.290.0030.23019.14
5.4.280.0030.23019.09
5.4.270.0030.22319.01
5.4.260.0000.24319.03
5.4.250.0200.24319.18
5.4.240.0030.25019.19
5.4.230.0100.21719.06
5.4.220.0070.21319.02
5.4.210.0030.24019.20
5.4.200.0170.25018.96
5.4.190.0070.23319.20
5.4.180.0030.24319.04
5.4.170.0100.25019.11
5.4.160.0130.23019.25
5.4.150.0070.20719.09
5.4.140.0100.23016.37
5.4.130.0100.22316.23
5.4.120.0000.18016.52
5.4.110.0030.21016.49
5.4.100.0130.23016.41
5.4.90.0170.22716.50
5.4.80.0000.18316.49
5.4.70.0030.17316.39
5.4.60.0030.18316.30
5.4.50.0030.19016.47
5.4.40.0030.18016.51
5.4.30.0000.14716.28
5.4.20.0030.16316.29
5.4.10.0070.22316.37
5.4.00.0030.24315.89
5.3.290.0170.42014.71
5.3.280.0100.44314.61
5.3.270.0030.41014.73
5.3.260.0100.41014.60
5.3.250.0130.40014.63
5.3.240.0030.43314.59
5.3.230.0130.36014.73
5.3.220.0070.36014.67
5.3.210.0070.40014.70
5.3.200.0000.40314.55
5.3.190.0030.36014.51
5.3.180.0100.35314.55
5.3.170.0030.29314.67
5.3.160.0030.30014.57
5.3.150.0070.33314.65
5.3.140.0070.28714.59
5.3.130.0030.30014.56
5.3.120.0030.34314.54
5.3.110.0130.38014.67
5.3.100.0030.40714.09
5.3.90.0100.38014.14
5.3.80.0070.33714.16
5.3.70.0070.36014.00
5.3.60.0030.41313.93
5.3.50.0070.39713.95
5.3.40.0170.36314.00
5.3.30.0100.40313.96
5.3.20.0130.40713.61
5.3.10.0070.39713.74
5.3.00.0030.40713.77
5.2.170.0000.04011.14
5.2.160.0030.06311.11
5.2.150.0100.05311.21
5.2.140.0030.05711.13
5.2.130.0100.02311.09
5.2.120.0070.05711.14
5.2.110.0130.05010.94
5.2.100.0100.06011.01
5.2.90.0030.06310.95
5.2.80.0000.06011.08
5.2.70.0030.06311.18
5.2.60.0070.05711.00
5.2.50.0030.05711.07
5.2.40.0030.06010.91
5.2.30.0030.06710.82
5.2.20.0030.06010.75
5.2.10.0100.05310.93
5.2.00.0030.06310.72
5.1.60.0030.05310.05
5.1.50.0030.0539.99
5.1.40.0000.03010.00
5.1.30.0100.04010.26
5.1.20.0070.05010.29
5.1.10.0070.05310.12
5.1.00.0030.04310.05
5.0.50.0000.0478.60
5.0.40.0030.0438.34
5.0.30.0070.0578.34
5.0.20.0000.0438.34
5.0.10.0030.0438.34
5.0.00.0000.0508.34
4.4.90.0070.0308.34
4.4.80.0000.0378.34
4.4.70.0000.0338.34
4.4.60.0000.0378.34
4.4.50.0030.0338.34
4.4.40.0000.0508.34
4.4.30.0000.0378.34
4.4.20.0030.0378.34
4.4.10.0000.0208.34
4.4.00.0030.0508.34
4.3.110.0000.0278.34
4.3.100.0000.0378.34
4.3.90.0030.0338.34
4.3.80.0000.0538.34
4.3.70.0030.0378.34
4.3.60.0030.0238.34
4.3.50.0070.0278.34
4.3.40.0070.0508.34
4.3.30.0030.0278.34
4.3.20.0030.0378.34
4.3.10.0000.0238.34
4.3.00.0000.0378.34

preferences:
41.11 ms | 401 KiB | 5 Q