3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} $foo = new Foo; $rounds = 1000000; $start = microtime(true); for($i=0; $i<$rounds; $i++) { get_class($foo); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $i++) { (new ReflectionClass($foo))->getName(); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); $refl = new ReflectionClass($foo); for($i=0; $i<$rounds; $i++) { $refl->getName(); } echo (microtime(true) - $start);

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.0100.37814.91
7.3.120.0100.33114.57
7.3.110.0100.43615.04
7.3.100.0030.30514.50
7.3.90.0000.40015.11
7.3.80.0070.40714.95
7.3.70.0030.29414.53
7.3.60.0030.31114.86
7.3.50.0100.32314.83
7.3.40.0030.29614.86
7.3.30.0070.30714.97
7.3.20.0070.30416.68
7.3.10.0080.29416.71
7.3.00.0080.31516.58
7.2.250.0030.41914.93
7.2.240.0070.55215.18
7.2.230.0070.40914.80
7.2.220.0070.47315.08
7.2.210.0070.44014.91
7.2.200.0000.45714.79
7.2.190.0000.44415.24
7.2.180.0000.40515.11
7.2.170.0030.53915.16
7.2.130.0070.38516.88
7.2.120.0070.39116.82
7.2.110.0070.40017.04
7.2.100.0030.38316.71
7.2.90.0030.38116.96
7.2.80.0030.38317.04
7.2.70.0070.37016.86
7.2.60.0070.37816.87
7.2.50.0070.37017.06
7.2.40.0030.39117.02
7.2.30.0000.42517.09
7.2.20.0070.38116.62
7.2.10.0100.37217.00
7.2.00.0030.33818.23
7.1.330.0030.74615.98
7.1.320.0070.61116.04
7.1.310.0030.65815.64
7.1.300.0070.68015.51
7.1.290.0030.81115.64
7.1.280.0030.76615.84
7.1.270.0030.73715.81
7.1.260.0000.62415.53
7.1.250.0070.61215.88
7.1.70.0070.33617.13
7.1.60.0100.40119.31
7.1.50.0100.38216.86
7.1.00.0000.61022.45
7.0.200.0030.37116.91
7.0.140.0030.41022.12
7.0.130.0100.60722.09
7.0.120.0000.30021.96
7.0.110.0030.55722.21
7.0.100.0070.35021.96
7.0.90.0030.39322.15
7.0.80.0000.39322.02
7.0.70.0030.28722.16
7.0.60.0000.40721.88
7.0.50.0000.41322.14
7.0.40.0000.37322.20
7.0.30.0030.40022.04
7.0.20.0070.53322.18
7.0.10.0000.29722.12
7.0.00.0070.31022.00
5.6.280.0000.77321.12
5.6.270.0031.08720.90
5.6.260.0030.68721.13
5.6.250.0131.12020.90
5.6.240.0030.74020.96
5.6.230.0030.77721.13
5.6.220.0030.63721.09
5.6.210.0000.77020.97
5.6.200.0000.64020.86
5.6.190.0000.79021.08
5.6.180.0070.77320.87
5.6.170.0101.21021.05
5.6.160.0030.65320.84
5.6.150.0000.75320.98
5.6.140.0001.22321.10
5.6.130.0000.99720.87
5.6.120.0070.74320.93
5.6.110.0031.14720.93
5.6.100.0030.80020.85
5.6.90.0001.13321.04
5.6.80.0000.66020.41
5.6.70.0030.72320.37
5.6.60.0070.66320.47
5.6.50.0100.87320.32
5.6.40.0000.65720.45
5.6.30.0000.73020.39
5.6.20.0030.88720.29
5.6.10.0000.95720.09
5.6.00.0030.81020.21
5.5.380.0001.12317.59
5.5.370.0000.67317.70
5.5.360.0070.71317.75
5.5.350.0071.24317.61
5.5.340.0000.67317.95
5.5.330.0000.74717.95
5.5.320.0001.24718.11
5.5.310.0070.88718.23
5.5.300.0000.63317.89
5.5.290.0031.20018.02
5.5.280.0030.75317.95
5.5.270.0030.74318.22
5.5.260.0030.63017.81
5.5.250.0030.71018.07
5.5.240.0030.61317.64
5.5.230.0030.63317.64
5.5.220.0030.70717.19
5.5.210.0000.65017.28
5.5.200.0000.61717.43
5.5.190.0000.65317.25
5.5.180.0000.65017.30
5.5.160.0070.78717.24
5.5.150.0070.75317.21
5.5.140.0000.77717.38
5.5.130.0070.86017.49
5.5.120.0100.75017.51
5.5.110.0000.65017.25
5.5.100.0000.82017.06
5.5.90.0000.75017.37
5.5.80.0000.82317.32
5.5.70.0030.78317.36
5.5.60.0001.17317.16
5.5.50.0030.79317.06
5.5.40.0030.72017.27
5.5.30.0030.78317.53
5.5.20.0030.73017.26
5.5.10.0000.65317.49
5.5.00.0031.16017.33
5.4.450.0000.73719.34
5.4.440.0000.69319.48
5.4.430.0030.71719.47
5.4.420.0030.72319.55
5.4.410.0031.15719.52
5.4.400.0030.72719.24
5.4.390.0030.76019.20
5.4.380.0000.61719.18
5.4.370.0130.74319.20
5.4.360.0001.05019.31
5.4.350.0030.63719.18
5.4.340.0000.72719.29
5.4.320.0030.74019.05
5.4.310.0000.66319.16
5.4.300.0030.78019.02
5.4.290.0030.92718.93
5.4.280.0070.89019.01
5.4.270.0130.77319.23
5.4.260.0001.15319.02
5.4.250.0030.73319.19
5.4.240.0000.71318.88
5.4.230.0130.73319.19
5.4.220.0000.63319.31
5.4.210.0030.85018.92
5.4.200.0030.97019.17
5.4.190.0070.71019.01
5.4.180.0031.21318.88
5.4.170.0070.66019.23
5.4.160.0000.88319.15
5.4.150.0000.62719.29
5.4.140.0100.77316.52
5.4.130.0030.88716.61
5.4.120.0030.81716.45
5.4.110.0000.76716.51
5.4.100.0070.60316.41
5.4.90.0001.19016.40
5.4.80.0031.20316.49
5.4.70.0070.94716.35
5.4.60.0071.20016.48
5.4.50.0030.88016.49
5.4.40.0030.73716.48
5.4.30.0000.72016.28
5.4.20.0071.24016.51
5.4.10.0070.72316.49
5.4.00.0030.73015.90
5.3.290.0070.02714.72
5.3.280.0030.06314.59
5.3.270.0000.05714.46
5.3.260.0030.05314.60
5.3.250.0000.03014.68
5.3.240.0030.06714.74
5.3.230.0000.06714.69
5.3.220.0070.02314.54
5.3.210.0030.03314.57
5.3.200.0000.03014.46
5.3.190.0030.06714.70
5.3.180.0030.06714.58
5.3.170.0030.06714.46
5.3.160.0030.06714.78
5.3.150.0030.08314.64
5.3.140.0070.08014.41
5.3.130.0000.07314.57
5.3.120.0100.06314.77
5.3.110.0000.08314.55
5.3.100.0070.06314.04
5.3.90.0000.06714.02
5.3.80.0000.07314.00
5.3.70.0000.06014.07
5.3.60.0030.06714.00
5.3.50.0070.06013.92
5.3.40.0000.06714.16
5.3.30.0000.06013.99
5.3.20.0030.06013.77
5.3.10.0030.06313.79
5.3.00.0070.06313.66

preferences:
34.8 ms | 401 KiB | 5 Q