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.0070.38114.70
7.3.120.0070.32214.65
7.3.110.0100.29314.99
7.3.100.0030.30714.91
7.3.90.0000.30914.88
7.3.80.0130.26414.86
7.3.70.0000.39614.86
7.3.60.0030.29814.91
7.3.50.0100.29114.68
7.3.40.0030.27614.79
7.3.30.0070.27714.79
7.3.20.0070.29216.61
7.3.10.0100.29216.53
7.3.00.0070.29516.76
7.2.250.0100.51915.13
7.2.240.0160.50515.13
7.2.230.0070.40714.85
7.2.220.0030.40014.93
7.2.210.0070.40215.11
7.2.200.0030.45715.13
7.2.190.0030.52314.88
7.2.180.0130.41915.06
7.2.170.0000.53915.09
7.2.00.0030.28619.12
7.1.330.0100.61116.07
7.1.320.0030.63215.89
7.1.310.0030.55915.92
7.1.300.0100.60815.73
7.1.290.0030.70715.58
7.1.280.0030.67815.57
7.1.270.0030.66615.88
7.1.260.0030.57415.68
7.1.70.0030.32516.93
7.1.60.0100.36219.40
7.1.50.0100.40816.79
7.1.00.0070.38722.30
7.0.200.0000.30616.61
7.0.140.0000.42721.95
7.0.60.0030.39321.81
7.0.50.0070.46022.12
7.0.40.0130.45320.19
7.0.30.0100.43020.13
7.0.20.0270.42720.03
7.0.10.0000.40320.10
7.0.00.0030.45020.05
5.6.280.0000.74321.12
5.6.210.0070.88320.48
5.6.200.0100.71721.00
5.6.190.0070.84721.01
5.6.180.0070.72020.90
5.6.170.0030.75321.13
5.6.160.0130.84321.00
5.6.150.0030.88721.00
5.6.140.0030.75721.01
5.6.130.0000.85721.05
5.6.120.0100.86321.00
5.6.110.0070.93021.05
5.6.100.0070.84321.10
5.6.90.0130.84320.95
5.6.80.0030.87720.38
5.6.70.0000.72320.53
5.6.60.0031.05020.37
5.6.50.0100.85720.45
5.6.40.0100.85320.42
5.6.30.0030.76320.37
5.6.20.0100.87720.26
5.6.10.0000.85320.35
5.6.00.0100.76320.50
5.5.350.0070.87320.42
5.5.340.0000.87720.78
5.5.330.0100.89020.81
5.5.320.0070.75720.77
5.5.310.0000.85720.96
5.5.300.0000.71320.97
5.5.290.0100.74020.77
5.5.280.0030.90720.69
5.5.270.0000.73020.73
5.5.260.0070.89720.98
5.5.250.0070.86720.59
5.5.240.0030.82020.34
5.5.230.0001.11720.11
5.5.220.0000.69720.36
5.5.210.0130.86720.18
5.5.200.0070.87320.04
5.5.190.0030.88020.16
5.5.180.0070.89020.23
5.5.160.0030.86320.32
5.5.150.0030.84020.34
5.5.140.0030.66320.15
5.5.130.0130.84720.23
5.5.120.0100.85720.04
5.5.110.0170.87020.24
5.5.100.0030.76320.10
5.5.90.0070.88720.01
5.5.80.0000.86720.13
5.5.70.0030.87720.11
5.5.60.0030.88320.01
5.5.50.0030.87020.00
5.5.40.0000.70320.09
5.5.30.0030.70020.02
5.5.20.0070.86019.99
5.5.10.0030.79720.00
5.5.00.0070.84320.01
5.4.450.0030.85319.34
5.4.440.0030.85019.36
5.4.430.0000.86019.23
5.4.420.0130.83319.38
5.4.410.0070.84719.13
5.4.400.0070.67719.17
5.4.390.0070.70719.14
5.4.380.0000.69319.02
5.4.370.0030.87319.07
5.4.360.0100.86719.21
5.4.350.0070.84719.02
5.4.340.0030.82319.17
5.4.320.0030.65719.02
5.4.310.0000.86018.88
5.4.300.0000.82719.17
5.4.290.0100.84319.06
5.4.280.0030.86019.16
5.4.270.0130.82319.01
5.4.260.0000.66319.07
5.4.250.0030.85719.07
5.4.240.0000.84019.13
5.4.230.0030.82319.19
5.4.220.0000.86019.16
5.4.210.0030.86319.19
5.4.200.0100.82019.16
5.4.190.0100.84019.05
5.4.180.0030.72718.91
5.4.170.0000.84718.90
5.4.160.0071.02018.89
5.4.150.0000.84319.18
5.4.140.0000.82016.47
5.4.130.0100.88316.41
5.4.120.0000.83716.45
5.4.110.0070.83016.43
5.4.100.0000.85316.36
5.4.90.0000.83016.54
5.4.80.0000.71716.40
5.4.70.0031.11016.30
5.4.60.0030.69316.33
5.4.50.0000.64016.52
5.4.40.0000.64716.40
5.4.30.0030.71316.22
5.4.20.0000.74016.45
5.4.10.0030.80016.32
5.4.00.0000.79315.93
5.3.290.0030.07014.73
5.3.280.0000.08014.56
5.3.270.0000.08014.64
5.3.260.0070.05714.57
5.3.250.0100.03014.65
5.3.240.0070.04714.67
5.3.230.0000.08014.66
5.3.220.0030.07314.61
5.3.210.0100.06714.64
5.3.200.0100.05714.63
5.3.190.0000.03014.63
5.3.180.0030.03314.61
5.3.170.0070.02714.64
5.3.160.0030.02714.63
5.3.150.0000.03014.55
5.3.140.0000.03014.62
5.3.130.0000.03314.61
5.3.120.0070.07014.63
5.3.110.0000.03014.54
5.3.100.0000.08314.10
5.3.90.0000.04013.99
5.3.80.0030.08013.93
5.3.70.0070.07313.98
5.3.60.0070.06014.11
5.3.50.0070.05014.03
5.3.40.0000.05714.00
5.3.30.0070.06713.80
5.3.20.0030.06013.68
5.3.10.0030.06713.63
5.3.00.0030.07713.55
5.2.170.0000.05011.13
5.2.160.0030.06011.20
5.2.150.0030.04711.21
5.2.140.0070.04311.19
5.2.130.0030.04311.00
5.2.120.0000.06011.08
5.2.110.0030.05310.95
5.2.100.0000.05711.16
5.2.90.0030.05311.18
5.2.80.0070.05711.14
5.2.70.0000.06311.14
5.2.60.0030.05011.13
5.2.50.0000.05711.08
5.2.40.0070.05310.90
5.2.30.0030.05311.02
5.2.20.0030.05711.06
5.2.10.0000.05710.91
5.2.00.0000.05710.78
5.1.60.0000.05010.52
5.1.50.0030.04310.52
5.1.40.0000.05310.52
5.1.30.0100.04710.52
5.1.20.0000.05710.52
5.1.10.0070.05010.52
5.1.00.0030.05010.52
5.0.50.0000.04310.52
5.0.40.0030.03010.52
5.0.30.0000.05010.52
5.0.20.0000.04710.52
5.0.10.0030.03310.52
5.0.00.0000.05710.52
4.4.90.0030.03710.52
4.4.80.0030.03010.52
4.4.70.0030.03310.52
4.4.60.0030.03310.52
4.4.50.0030.03010.52
4.4.40.0000.05310.52
4.4.30.0000.03710.52
4.4.20.0000.03710.52
4.4.10.0000.03710.52
4.4.00.0030.04310.52
4.3.110.0000.03310.52
4.3.100.0030.03310.52
4.3.90.0000.02710.52
4.3.80.0030.05310.52
4.3.70.0000.03310.52
4.3.60.0030.03310.52
4.3.50.0000.03710.52
4.3.40.0000.05710.52
4.3.30.0000.04010.52
4.3.20.0000.04010.52
4.3.10.0000.03010.52
4.3.00.0000.03310.52

preferences:
38.17 ms | 401 KiB | 5 Q