3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function foo() { $start = microtime(true); for ($i=0; $i<1e5; $i++) { $a=get_called_class(); } $end = microtime(true); echo "Took: ", ($end-$start)*1e3, " ms"; $start = microtime(true); for ($i=0; $i<1e5; $i++) { $a=static::class; } $end = microtime(true); echo "Took: ", ($end-$start)*1e3, " ms"; } } $obj = new Test; $obj->foo();

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)
7.4.00.0060.01614.84
7.3.120.0070.01514.75
7.3.110.0040.01814.85
7.3.100.0030.01315.03
7.3.90.0070.01014.68
7.3.80.0040.01515.08
7.3.70.0030.01714.79
7.3.60.0060.00914.66
7.3.50.0070.01414.58
7.3.40.0030.01614.86
7.3.30.0100.00714.89
7.3.20.0060.01216.72
7.3.10.0120.00316.46
7.3.00.0100.00716.57
7.2.250.0070.01415.29
7.2.240.0030.02115.19
7.2.230.0030.01515.11
7.2.220.0000.01215.27
7.2.210.0000.01715.02
7.2.200.0030.01715.25
7.2.190.0000.02015.10
7.2.180.0000.02115.24
7.2.170.0090.00615.07
7.2.00.0030.01319.63
7.1.330.0070.02015.89
7.1.320.0090.01515.48
7.1.310.0040.02515.60
7.1.300.0000.02815.90
7.1.290.0000.02515.58
7.1.280.0060.01315.65
7.1.270.0000.02815.83
7.1.260.0070.02015.62
7.1.70.0000.01217.09
7.1.60.0040.03219.40
7.1.50.0030.02116.99
7.1.00.0070.08322.27
7.0.200.0000.01116.90
7.0.140.0000.08322.14
7.0.100.0470.08319.82
7.0.90.0570.08019.86
7.0.80.0270.09719.82
7.0.70.0500.07019.90
7.0.60.0430.07719.87
7.0.50.0370.08720.32
7.0.40.0100.08720.04
7.0.30.0170.08720.13
7.0.20.0070.09019.95
7.0.10.0130.08319.94
7.0.00.0100.08319.98
5.6.280.0100.09321.08
5.6.250.0130.08720.62
5.6.240.0100.10720.59
5.6.230.0200.09320.60
5.6.220.0070.07720.67
5.6.210.0030.07020.41
5.6.200.0100.09321.01
5.6.190.0030.09020.98
5.6.180.0130.10021.00
5.6.170.0000.10721.04
5.6.160.0030.10020.91
5.6.150.0200.08021.09
5.6.140.0130.07321.09
5.6.130.0100.09321.00
5.6.120.0130.09720.98
5.6.110.0200.06321.02
5.6.100.0030.09321.05
5.6.90.0070.10721.04
5.6.80.0030.10020.37
5.6.70.0000.09720.32
5.6.60.0000.10320.29
5.6.50.0170.09020.45
5.6.40.0270.08320.42
5.6.30.0070.10320.25
5.6.20.0070.08720.30
5.6.10.0170.08320.26
5.6.00.0130.11720.38
5.5.380.0100.07320.28
5.5.370.0100.09720.31
5.5.360.0070.09720.30
5.5.350.0070.10020.27
5.5.340.0100.07020.79
5.5.330.0230.09320.78
5.5.320.0100.10320.76
5.5.310.0130.10320.87
5.5.300.0030.10720.75
5.5.290.0100.10720.71
5.5.280.0030.09320.73
5.5.270.0100.09720.69
5.5.260.0070.10020.77
5.5.250.0070.07320.64
5.5.240.0170.08720.22
5.5.230.0000.10320.09
5.5.220.0070.10020.13
5.5.210.0170.08320.16
5.5.200.0070.05320.08
5.5.190.0100.09020.22
5.5.180.0070.09019.90
5.5.160.0100.09320.19
5.5.150.0100.11020.10
5.5.140.0100.09020.04
5.5.130.0070.09720.11
5.5.120.0100.09720.10
5.5.110.0100.10020.23
5.5.100.0070.09720.00
5.5.90.0100.06320.02
5.5.80.0070.10319.93
5.5.70.0070.10720.02
5.5.60.0170.08720.09
5.5.50.0030.10720.00
5.5.40.0070.05320.05
5.5.30.0030.10719.94
5.5.20.0030.09320.11
5.5.10.0100.07020.00
5.5.00.0070.11019.96
5.4.450.0100.08319.50
5.4.440.0130.06319.45
5.4.430.0070.07319.53
5.4.420.0100.07719.41
5.4.410.0000.08019.19
5.4.400.0000.08319.17
5.4.390.0100.06019.13
5.4.380.0130.06719.24
5.4.370.0070.07719.13
5.4.360.0030.04718.83
5.4.350.0070.07318.83
5.4.340.0130.08018.92
5.4.320.0130.06319.10
5.4.310.0130.04719.03
5.4.300.0130.07019.16
5.4.290.0130.06019.04
5.4.280.0070.07718.84
5.4.270.0100.04019.18
5.4.260.0000.08018.95
5.4.250.0100.07019.18
5.4.240.0130.06719.04
5.4.230.0030.08018.94
5.4.220.0070.07319.16
5.4.210.0070.06318.89
5.4.200.0030.07319.16
5.4.190.0100.07018.89
5.4.180.0130.07019.02
5.4.170.0170.07019.04
5.4.160.0070.07019.02
5.4.150.0030.07719.16
5.4.140.0130.07016.34
5.4.130.0130.05716.25
5.4.120.0130.05316.43
5.4.110.0030.07716.38
5.4.100.0070.07016.56
5.4.90.0000.07716.45
5.4.80.0000.05016.51
5.4.70.0170.03016.43
5.4.60.0030.06316.34
5.4.50.0070.07316.48
5.4.40.0130.06016.42
5.4.30.0100.06316.36
5.4.20.0100.07716.48
5.4.10.0100.05716.27
5.4.00.0030.08015.72
5.3.290.0100.07714.70
5.3.280.0100.07314.66
5.3.270.0170.06714.66
5.3.260.0070.07714.63
5.3.250.0030.07714.62
5.3.240.0070.07014.59
5.3.230.0070.05314.59
5.3.220.0000.04314.55
5.3.210.0100.07014.59
5.3.200.0030.07314.55
5.3.190.0100.06714.71
5.3.180.0030.05714.55
5.3.170.0030.04714.68
5.3.160.0000.08014.70
5.3.150.0030.08014.56
5.3.140.0070.05714.68
5.3.130.0030.04714.61
5.3.120.0030.08014.64
5.3.110.0030.07714.48
5.3.100.0000.08314.02
5.3.90.0030.07314.10
5.3.80.0170.06314.13
5.3.70.0030.08014.03
5.3.60.0100.06713.93
5.3.50.0070.04313.94
5.3.40.0030.04314.04
5.3.30.0030.07313.97
5.3.20.0100.06013.61
5.3.10.0130.05713.67
5.3.00.0130.06313.63
5.2.170.0030.06311.20
5.2.160.0100.05711.04
5.2.150.0070.05311.06
5.2.140.0100.05311.07
5.2.130.0070.03711.16
5.2.120.0000.06711.17
5.2.110.0000.06011.16
5.2.100.0100.03011.15
5.2.90.0030.06011.16
5.2.80.0070.06311.01
5.2.70.0000.05711.02
5.2.60.0030.05311.05
5.2.50.0070.04710.89
5.2.40.0070.06311.09
5.2.30.0070.05710.84
5.2.20.0070.04311.09
5.2.10.0030.06710.96
5.2.00.0030.06010.58
5.1.60.0100.04710.12
5.1.50.0000.06010.12
5.1.40.0070.04710.12
5.1.30.0000.04010.44
5.1.20.0000.05010.43
5.1.10.0100.04710.13
5.1.00.0000.05710.20
5.0.50.0070.0408.55
5.0.40.0030.0438.41
5.0.30.0070.0638.23
5.0.20.0070.0278.24
5.0.10.0030.0308.21
5.0.00.0070.0678.01
4.4.90.0030.0307.70
4.4.80.0000.0337.70
4.4.70.0070.0307.70
4.4.60.0030.0337.70
4.4.50.0030.0337.70
4.4.40.0070.0507.70
4.4.30.0070.0307.70
4.4.20.0030.0337.70
4.4.10.0030.0337.70
4.4.00.0000.0577.70
4.3.110.0000.0377.70
4.3.100.0000.0377.70
4.3.90.0000.0337.70
4.3.80.0000.0577.70
4.3.70.0000.0377.70
4.3.60.0070.0237.70
4.3.50.0030.0337.70
4.3.40.0000.0507.70
4.3.30.0000.0337.70
4.3.20.0030.0337.70
4.3.10.0000.0377.70
4.3.00.0000.0377.70

preferences:
35.49 ms | 401 KiB | 5 Q