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"; if (class_exists('ReflectionClass')) { $reflectionClass = new ReflectionClass($foo); $start = microtime(true); for($i=0; $i<$rounds; $i++) { $reflectionClass->getName(); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $reflectionClass = new ReflectionClass($foo); $reflectionClass->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.0030.32318.91
7.1.70.0070.41417.14
7.1.60.0070.41719.33
7.1.50.0070.38317.00
7.1.00.0000.41722.36
7.0.200.0100.30816.80
7.0.140.0000.44321.95
7.0.80.0700.39719.95
7.0.70.0470.41020.15
7.0.60.0470.36019.89
7.0.50.0470.47720.29
7.0.40.0130.44320.17
7.0.30.0070.46319.92
7.0.20.0170.45020.09
7.0.10.0130.41320.07
7.0.00.0070.46019.95
5.6.280.0100.84321.13
5.6.230.0030.85720.51
5.6.220.0030.81720.62
5.6.210.0030.69320.50
5.6.200.0100.74021.00
5.6.190.0070.80721.04
5.6.180.0100.91320.94
5.6.170.0070.91321.14
5.6.160.1070.89321.05
5.6.150.0030.89021.11
5.6.140.0100.93320.96
5.6.130.0000.72021.11
5.6.120.0070.85320.93
5.6.110.0030.86721.07
5.6.100.0000.77321.02
5.6.90.0070.86021.02
5.6.80.0030.84320.41
5.6.70.0030.85320.44
5.6.60.0070.87020.51
5.6.50.1330.93720.52
5.6.40.0100.90320.48
5.6.30.0030.90320.39
5.6.20.0030.80020.32
5.6.10.0100.87720.37
5.6.00.0200.85320.52
5.5.370.0170.78320.41
5.5.360.0030.68020.39
5.5.350.0070.94020.46
5.5.340.0030.90320.89
5.5.330.0000.74020.93
5.5.320.0000.91320.87
5.5.310.0000.89720.88
5.5.300.0130.88020.83
5.5.290.0130.90720.65
5.5.280.0130.73020.91
5.5.270.0070.89320.88
5.5.260.0170.84320.90
5.5.250.0100.78720.70
5.5.240.0000.75320.30
5.5.230.0130.88320.13
5.5.220.0030.78320.29
5.5.210.0100.87720.30
5.5.200.0070.76320.25
5.5.190.0100.76720.27
5.5.180.0070.89320.09
5.5.160.0070.89720.15
5.5.150.0030.89719.98
5.5.140.0070.89320.09
5.5.130.0070.74720.18
5.5.120.0170.83720.23
5.5.110.0100.81720.23
5.5.100.0170.78720.16
5.5.90.0100.86020.17
5.5.80.0070.88719.95
5.5.70.0000.94720.07
5.5.60.0030.99720.06
5.5.50.0070.89319.95
5.5.40.0000.74020.14
5.5.30.0100.73320.11
5.5.20.0070.68020.05
5.5.10.0030.73320.00
5.5.00.0000.74319.96
5.4.450.0030.88319.38
5.4.440.0000.65319.36
5.4.430.0070.86719.37
5.4.420.0130.75019.44
5.4.410.0230.85019.28
5.4.400.0030.87319.24
5.4.390.0670.79719.18
5.4.380.0730.78319.14
5.4.370.0070.86019.16
5.4.360.0070.85319.09
5.4.350.0170.81318.85
5.4.340.0070.86019.09
5.4.320.0000.76319.09
5.4.310.0100.85319.23
5.4.300.0100.86719.22
5.4.290.0100.85019.03
5.4.280.0130.85019.04
5.4.270.0100.86018.89
5.4.260.0030.66718.95
5.4.250.0030.70719.02
5.4.240.0070.88719.18
5.4.230.0670.65719.22
5.4.220.0100.86319.16
5.4.210.0030.66719.20
5.4.200.0030.70018.94
5.4.190.0170.75719.08
5.4.180.0070.67719.13
5.4.170.0100.84719.11
5.4.160.0030.68719.10
5.4.150.0070.85019.16
5.4.140.0100.89016.19
5.4.130.0030.75016.18
5.4.120.0130.86016.41
5.4.110.0030.85016.27
5.4.100.0100.86016.46
5.4.90.0030.86316.46
5.4.80.0100.86316.33
5.4.70.0000.70016.42
5.4.60.0070.70016.54
5.4.50.0070.86716.41
5.4.40.0070.88016.30
5.4.30.0070.85016.48
5.4.20.0070.70716.33
5.4.10.0070.87316.48
5.4.00.0070.88715.78
5.3.290.0000.71314.79
5.3.280.0100.94014.61
5.3.270.1030.79314.54
5.3.260.0070.90714.66
5.3.250.0030.70314.72
5.3.240.0070.91314.60
5.3.230.0030.76314.57
5.3.220.0100.93314.68
5.3.210.0100.78714.60
5.3.200.0100.91014.50
5.3.190.0700.90714.63
5.3.180.0030.94014.71
5.3.170.0030.76314.54
5.3.160.0000.71714.52
5.3.150.0130.95714.66
5.3.140.0070.92014.66
5.3.130.0030.72314.52
5.3.120.0070.70014.54
5.3.110.0070.74314.61
5.3.100.0170.95714.14
5.3.90.0130.88314.12
5.3.80.0070.90714.04
5.3.70.0070.87014.00
5.3.60.0030.93014.15
5.3.50.0100.75714.00
5.3.40.0100.92313.87
5.3.30.0130.89713.84
5.3.20.0070.83713.79
5.3.10.0030.89013.67
5.3.00.0100.68013.70
5.2.170.0130.86711.70
5.2.160.0030.90011.70
5.2.150.0030.92011.70
5.2.140.0070.93311.70
5.2.130.0070.85711.70
5.2.120.0070.83011.70
5.2.110.0100.84711.70
5.2.100.0030.87311.70
5.2.90.0070.92711.70
5.2.80.0000.89011.70
5.2.70.0100.89711.70
5.2.60.0030.75711.70
5.2.50.0030.89311.70
5.2.40.0100.88311.70
5.2.30.0030.67711.70
5.2.20.0000.69311.70
5.2.10.0030.73311.70
5.2.00.0070.74011.70
5.1.60.0470.73311.70
5.1.50.0070.86011.70
5.1.40.0070.89011.70
5.1.30.0000.84711.70
5.1.20.0070.87311.70
5.1.10.0030.87011.70
5.1.00.0000.83011.70
5.0.50.0131.23711.70
5.0.40.0031.16011.70
5.0.30.0071.20311.70
5.0.20.0031.04711.70
5.0.10.0031.04711.70
5.0.00.0071.01311.70
4.4.90.0000.24311.70
4.4.80.0030.22711.70
4.4.70.0000.20711.70
4.4.60.0000.27011.70
4.4.50.0000.22311.70
4.4.40.0000.29011.70
4.4.30.0070.29311.70
4.4.20.0030.30011.70
4.4.10.0000.27011.70
4.4.00.0000.29311.70
4.3.110.0000.25011.70
4.3.100.0030.31011.70
4.3.90.0000.32711.70
4.3.80.0000.28711.70
4.3.70.0070.31011.70
4.3.60.0030.30011.70
4.3.50.0000.23011.70
4.3.40.0070.31011.70
4.3.30.0000.29711.70
4.3.20.0000.26011.70
4.3.10.0030.29711.70
4.3.00.0070.27311.70

preferences:
55.49 ms | 401 KiB | 5 Q