3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} $foo = new Foo; $start = microtime(true); for($i=0; $i<1000000; $i++) { get_class($foo); } echo (microtime(true) - $start); echo "<br>\n"; $start = microtime(true); for($i=0; $i<1000000; $i++) { (new ReflectionClass($foo))->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.2.00.0000.25718.82
7.1.70.0000.33716.92
7.1.60.0030.34917.25
7.1.50.0030.28616.92
7.1.40.0030.34116.56
7.1.30.0100.31416.64
7.1.20.0000.28916.70
7.1.10.0030.30616.79
7.1.00.0030.29016.65
7.0.200.0030.30616.77
7.0.190.0030.26916.62
7.0.180.0030.26016.18
7.0.170.0070.27516.13
7.0.160.0000.31616.13
7.0.150.0070.31116.27
7.0.140.0030.27316.10
7.0.130.0070.28016.58
7.0.120.0000.33316.51
7.0.110.0030.28916.30
7.0.100.0030.26616.23
7.0.90.0000.33016.29
7.0.80.0030.30716.21
7.0.70.0130.28716.39
7.0.60.0000.36116.20
7.0.50.0160.28416.33
7.0.40.0000.31215.99
7.0.30.0130.28315.99
7.0.20.0030.32815.99
7.0.10.0070.31015.99
7.0.00.0030.31715.99
5.6.300.0130.60920.84
5.6.290.0000.77420.49
5.6.280.0030.65120.86
5.6.270.0000.60720.81
5.6.260.0100.73220.82
5.6.250.0000.58220.83
5.6.240.0070.64320.92
5.6.230.0030.68320.96
5.6.220.0000.66020.86
5.6.210.0030.66220.57
5.6.200.0070.60920.99
5.6.190.0070.65920.89
5.6.180.0100.64320.89
5.6.170.0030.67120.66
5.6.160.0130.70620.93
5.6.150.0100.66520.79
5.6.140.0030.68620.91
5.6.130.0070.71520.81
5.6.120.0100.72320.88
5.6.110.0270.74920.80
5.6.100.0130.81621.03
5.6.90.0130.64020.72
5.6.80.0070.69520.28
5.6.70.0070.60120.27
5.6.60.0030.62220.19
5.6.50.0030.61020.34
5.6.40.0070.60420.18
5.6.30.0130.69420.38
5.6.20.0030.61720.18
5.6.10.0030.60820.18
5.6.00.0000.77420.27
5.5.380.0100.64217.58
5.5.370.0030.59817.55
5.5.360.0030.66617.54
5.5.350.0000.60117.54
5.5.340.0030.75618.07
5.5.330.0030.65417.69
5.5.320.0070.66218.00
5.5.310.0030.69918.08
5.5.300.0070.63317.86
5.5.290.0070.72217.75
5.5.280.0170.82417.70
5.5.270.0170.84517.80
5.5.260.0100.71318.05
5.5.250.0000.74217.82
5.5.240.0030.59917.42
5.5.230.0130.60517.47
5.5.220.0000.61017.46
5.5.210.0070.61717.46
5.5.200.0070.59917.45
5.5.190.0070.64517.35
5.5.180.0030.60217.21
5.5.160.0170.64517.47
5.5.150.0100.60117.09
5.5.140.0070.68117.44
5.5.130.0070.62317.52
5.5.120.0030.68117.40
5.5.110.1110.64017.43
5.5.100.0030.63617.44
5.5.90.0030.65817.25
5.5.80.0030.58317.37
5.5.70.0030.63417.25
5.5.60.0000.64217.25
5.5.50.0000.69316.98
5.5.40.0070.59717.10
5.5.30.0030.63217.33
5.5.20.0070.67817.33
5.5.10.0100.76217.27
5.5.00.0000.69517.32
5.4.450.0170.69219.32
5.4.440.0170.65219.29
5.4.430.0260.69919.52
5.4.420.0030.70819.24
5.4.410.0130.62419.16
5.4.400.0030.59219.20
5.4.390.0070.67519.20
5.4.380.0030.60118.98
5.4.370.0000.67619.07
5.4.360.0030.60519.14
5.4.350.0070.62319.14
5.4.340.0030.58719.06
5.4.320.0070.65018.92
5.4.310.0070.58719.07
5.4.300.0030.59819.18
5.4.290.0030.67119.18
5.4.280.0030.59219.08
5.4.270.0000.62218.99
5.4.260.0030.61119.20
5.4.250.0100.62418.95
5.4.240.0070.58019.14
5.4.230.0030.58918.94
5.4.220.0030.65718.94
5.4.210.0000.64519.13
5.4.200.0070.62019.00
5.4.190.0000.60218.88
5.4.180.0070.65219.13
5.4.170.0030.63918.90
5.4.160.0070.64918.91
5.4.150.1630.63719.22
5.4.140.0100.70816.45
5.4.130.0200.73216.71
5.4.120.0070.60516.66
5.4.110.0170.67016.55
5.4.100.0070.57716.45
5.4.90.0070.61916.48
5.4.80.0030.68116.68
5.4.70.0000.65416.71
5.4.60.1390.65716.45
5.4.50.0030.61816.67
5.4.40.0030.62416.66
5.4.30.0170.69516.60
5.4.20.0000.64916.44
5.4.10.0000.61916.55
5.4.00.0070.61215.96
5.3.290.0070.03415.99
5.3.280.0070.03815.07
5.3.270.0000.04615.07
5.3.260.0000.04415.07
5.3.250.0070.04015.07
5.3.240.0030.04515.07
5.3.230.0030.03915.07
5.3.220.0040.04215.07
5.3.210.0040.04015.07
5.3.200.0030.04115.07
5.3.190.0060.03615.07
5.3.180.0000.04015.07
5.3.170.0070.03415.07
5.3.160.0070.03415.07
5.3.150.0170.04115.07
5.3.140.0000.04415.07
5.3.130.0030.03715.07
5.3.120.0100.03315.07
5.3.110.0070.04015.07
5.3.100.0040.03915.07
5.3.90.0000.04015.07
5.3.80.0000.03915.07
5.3.70.0000.03915.07
5.3.60.0030.03415.07
5.3.50.0000.04315.07
5.3.40.0060.03215.07
5.3.30.0100.02915.07
5.3.20.0030.03815.07
5.3.10.0100.02915.07
5.3.00.0000.04115.07
5.2.170.0030.03415.07
5.2.160.0090.02415.07
5.2.150.0090.02515.07
5.2.140.0090.02515.07
5.2.130.0030.03415.07
5.2.120.0060.02615.07
5.2.110.0000.03115.07
5.2.100.0060.02415.07
5.2.90.0030.02715.07
5.2.80.0030.03415.07
5.2.70.0110.03215.07
5.2.60.0030.02815.07
5.2.50.0070.03315.07
5.2.40.0070.02315.07
5.2.30.0030.02815.07
5.2.20.0000.03915.07
5.2.10.0030.02715.07
5.2.00.0030.02815.07
5.1.60.0030.02415.07
5.1.50.0040.02515.07
5.1.40.0030.02415.07
5.1.30.0060.03915.07
5.1.20.0030.02915.07
5.1.10.0050.02415.07
5.1.00.0030.02615.07
5.0.50.0030.02215.07
5.0.40.0040.02115.07
5.0.30.0030.03515.07
5.0.20.0000.02215.07
5.0.10.0030.02015.07
5.0.00.0030.02915.07
4.4.90.0040.01515.07
4.4.80.0030.01315.07
4.4.70.0060.03815.07
4.4.60.0000.01815.07
4.4.50.0090.01515.07
4.4.40.0040.03515.07
4.4.30.0000.01815.07
4.4.20.0000.03115.07
4.4.10.0030.01315.07
4.4.00.0070.03415.07
4.3.110.0000.01815.07
4.3.100.0030.01415.07
4.3.90.0100.00815.07
4.3.80.0000.02515.07
4.3.70.0000.01915.07
4.3.60.0030.01315.07
4.3.50.0030.01615.07
4.3.40.0000.02515.07
4.3.30.0030.01515.07
4.3.20.0000.01715.07
4.3.10.0000.01815.07
4.3.00.0030.01415.07

preferences:
42.94 ms | 401 KiB | 5 Q