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"; $reflectionClass = new ReflectionClass($foo); $start = microtime(true); for($i=0; $i<$rounds; $i++) { $reflectionClass->getName(); } echo (microtime(true) - $start); echo "\n"; if (class_exists('ReflectionClass')) { $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.4.10.0030.39115.06
7.4.00.0070.39014.92
7.3.130.0030.33214.98
7.3.120.0070.45315.13
7.3.110.0070.48314.81
7.3.100.0000.39914.95
7.3.90.0030.36115.04
7.3.80.0030.37614.88
7.3.70.0070.32714.71
7.3.60.0070.38714.79
7.3.50.0070.37014.63
7.3.40.0070.30614.88
7.3.30.0030.46714.87
7.3.20.0070.41416.50
7.3.10.0070.36716.70
7.3.00.0100.31016.55
7.2.260.0070.54115.05
7.2.250.0070.58215.09
7.2.240.0100.53915.23
7.2.230.0030.53415.16
7.2.220.0030.45415.17
7.2.210.0070.45515.08
7.2.200.0070.49014.74
7.2.190.0070.46914.95
7.2.180.0030.43714.95
7.2.170.0000.61315.01
7.2.160.0000.41114.76
7.2.150.0030.43716.81
7.2.140.0000.40516.86
7.2.130.0030.64516.72
7.2.120.0070.43716.98
7.2.110.0070.46416.95
7.2.100.0030.44917.04
7.2.90.0310.52616.91
7.2.80.0070.55417.08
7.2.70.0070.57416.98
7.2.60.0130.53216.83
7.2.50.0100.42217.03
7.2.40.0070.42717.15
7.2.30.0030.62517.03
7.2.20.0100.48016.80
7.2.10.0100.39716.70
7.2.00.0070.61716.83
7.1.330.0030.84715.89
7.1.320.0000.82515.86
7.1.310.0030.60415.76
7.1.300.0030.68915.69
7.1.290.0030.68615.80
7.1.280.0100.68315.64
7.1.270.0070.78615.73
7.1.260.0070.80015.66
7.1.250.0030.83515.80
7.1.240.0100.76115.50
7.1.230.0030.76715.89
7.1.220.0070.72715.93
7.1.210.0030.59615.86
7.1.200.0030.88715.89
7.1.190.0070.61315.79
7.1.180.0070.86015.61
7.1.170.0030.84815.91
7.1.160.0030.83415.84
7.1.150.0030.71115.76
7.1.140.0070.70815.91
7.1.130.0030.67615.90
7.1.120.0070.88015.98
7.1.110.0130.64515.72
7.1.100.0000.70115.72
7.1.90.0070.65116.04
7.1.80.0000.87715.64
7.1.70.0050.56116.46
7.1.60.0080.53817.68
7.1.50.0030.50516.45
7.1.40.0070.78415.89
7.1.30.0070.76215.86
7.1.20.0030.66415.64
7.1.10.0000.77515.57
7.1.00.0070.52019.12
7.0.330.0070.77315.49
7.0.320.0030.74915.39
7.0.310.0030.82115.50
7.0.300.0030.87415.28
7.0.290.0100.66515.35
7.0.280.0030.67615.38
7.0.270.0070.85415.43
7.0.260.0030.75515.39
7.0.250.0030.67515.50
7.0.240.0000.89715.48
7.0.230.0030.66015.48
7.0.220.0000.83215.55
7.0.210.0030.85015.52
7.0.200.0050.56315.92
7.0.190.0030.72615.56
7.0.180.0030.80515.49
7.0.170.0030.69315.36
7.0.160.0000.87815.45
7.0.150.0030.91615.57
7.0.140.0000.67418.69
7.0.130.0030.80415.50
7.0.120.0020.63918.54
7.0.110.0430.54017.59
7.0.100.0320.58017.78
7.0.90.0330.57417.68
7.0.80.0120.51317.61
7.0.70.0130.62917.63
7.0.60.0380.51717.64
7.0.50.0080.49118.00
7.0.40.0030.52316.74
7.0.30.0030.60816.71
7.0.20.0030.63416.84
7.0.10.0070.64816.88
7.0.00.0100.62516.89
5.6.400.0031.25414.09
5.6.390.0071.55414.17
5.6.380.0031.81014.36
5.6.370.0101.36014.25
5.6.360.0031.61714.49
5.6.350.0031.83214.41
5.6.340.0101.66114.70
5.6.330.0071.74614.54
5.6.320.0001.70614.23
5.6.310.0031.33713.97
5.6.300.0031.79514.60
5.6.290.0031.64014.34
5.6.280.0021.07017.68
5.6.270.0101.48214.60
5.6.260.0001.86614.31
5.6.250.0121.26817.56
5.6.240.0051.18717.58
5.6.230.0051.13417.40
5.6.220.0071.30417.51
5.6.210.0071.04717.53
5.6.200.0031.28617.77
5.6.190.0051.10617.73
5.6.180.0121.31117.67
5.6.170.0051.26517.80
5.6.160.0021.07717.85
5.6.150.0081.19017.68
5.6.140.0001.16017.71
5.6.130.0051.30517.72
5.6.120.0051.30817.86
5.6.110.0101.21517.67
5.6.100.0021.23817.57
5.6.90.0081.27117.80
5.6.80.0051.21717.29
5.6.70.0051.11917.31
5.6.60.0081.31017.21
5.6.50.0031.25517.41
5.6.40.0051.29317.35
5.6.30.0051.06617.46
5.6.20.0031.08717.38
5.6.10.0101.32317.17
5.6.00.0081.28217.33
5.5.380.0101.26917.33
5.5.370.0071.18817.44
5.5.360.0071.29317.35
5.5.350.0021.27717.28
5.5.340.0041.13417.57
5.5.330.0121.26117.70
5.5.320.0071.17417.74
5.5.310.0021.04917.60
5.5.300.0101.14017.69
5.5.290.0031.21817.44
5.5.280.0021.14917.63
5.5.270.0031.36617.51
5.5.260.0101.04317.54
5.5.250.0021.28317.37
5.5.240.0081.28917.43
5.5.230.0051.05417.33
5.5.220.0051.08117.17
5.5.210.0071.33317.29
5.5.200.0071.30417.19
5.5.190.0071.21417.34
5.5.180.0101.14117.28
5.5.170.0101.70114.13
5.5.160.0071.07217.24
5.5.150.0071.34817.40
5.5.140.0081.18617.31
5.5.130.0051.31717.21
5.5.120.0071.11817.19
5.5.110.0051.30417.34
5.5.100.0051.02717.17
5.5.90.0071.29417.16
5.5.80.0051.15417.25
5.5.70.0031.32417.16
5.5.60.0051.01617.31
5.5.50.0051.09917.19
5.5.40.0071.32917.00
5.5.30.0031.33817.27
5.5.20.0081.16317.20
5.5.10.0081.05917.25
5.5.00.0121.25017.19
5.4.450.0031.15215.39
5.4.440.0101.24815.33
5.4.430.0031.23715.30
5.4.420.0031.34315.13
5.4.410.0031.13115.09
5.4.400.0081.19015.10
5.4.390.0051.34115.11
5.4.380.0031.18815.04
5.4.370.0081.29215.11
5.4.360.0071.22414.99
5.4.350.0051.23914.96
5.4.340.0031.14315.09
5.4.330.0071.75111.17
5.4.320.0021.33515.06
5.4.310.0071.18915.11
5.4.300.0051.32515.04
5.4.290.0071.34915.19
5.4.280.0071.18615.13
5.4.270.0031.17915.07
5.4.260.0021.35515.07
5.4.250.0021.19015.15
5.4.240.0021.14715.13
5.4.230.0071.27214.92
5.4.220.0071.29815.15
5.4.210.0031.10815.08
5.4.200.0031.22714.97
5.4.190.0001.30114.90
5.4.180.0081.19315.12
5.4.170.0081.32015.06
5.4.160.0071.19515.05
5.4.150.0031.22615.09
5.4.140.0081.25613.92
5.4.130.0071.15613.57
5.4.120.0031.30513.74
5.4.110.0081.31713.74
5.4.100.0031.36413.87
5.4.90.0051.31513.81
5.4.80.0001.30513.86
5.4.70.0031.36113.76
5.4.60.0081.23213.90
5.4.50.0021.26213.74
5.4.40.0381.17413.69
5.4.30.0051.08913.83
5.4.20.0051.35913.71
5.4.10.0051.19313.62
5.4.00.0001.05913.32
5.3.290.0041.41012.54
5.3.280.0031.61612.63
5.3.270.0051.36912.58
5.3.260.0031.61512.63
5.3.250.0051.37312.46
5.3.240.0081.58712.43
5.3.230.0081.50812.59
5.3.220.0021.57912.39
5.3.210.0681.26612.55
5.3.200.0051.42012.59
5.3.190.0051.61212.54
5.3.180.0021.60312.62
5.3.170.0071.33112.65
5.3.160.0081.57012.59
5.3.150.0051.47912.68
5.3.140.0031.57612.58
5.3.130.0071.57012.60
5.3.120.0031.51612.64
5.3.110.0121.42612.54
5.3.100.0071.40412.24
5.3.90.0021.54112.38
5.3.80.0051.58312.26
5.3.70.0031.43712.29
5.3.60.0031.53212.27
5.3.50.0051.52512.24
5.3.40.0021.45612.20
5.3.30.0051.44412.16
5.3.20.0071.35912.10
5.3.10.0071.25211.97
5.3.00.0051.21611.87
5.2.170.0030.82311.18
5.2.160.0100.84011.14
5.2.150.0000.91011.13
5.2.140.0070.74711.13
5.2.130.0000.75011.08
5.2.120.0030.76011.14
5.2.110.0130.82711.27
5.2.100.0100.83011.18
5.2.90.0070.82711.11
5.2.80.0070.84011.11
5.2.70.0030.81711.23
5.2.60.1500.76311.28
5.2.50.0030.85011.11
5.2.40.0000.84010.99
5.2.30.0030.83310.93
5.2.20.0030.83310.93
5.2.10.0100.80310.84
5.2.00.0030.84310.80
5.1.60.0030.80710.00
5.1.50.0000.84010.08
5.1.40.0000.80010.14
5.1.30.0070.84010.57
5.1.20.0100.77010.37
5.1.10.0000.74710.25
5.1.00.0030.81010.17
5.0.50.0031.1478.64
5.0.40.0001.1538.25
5.0.30.0031.0938.20
5.0.20.0031.3238.21
5.0.10.0031.1478.18
5.0.00.0031.1678.18
4.4.90.0030.3038.18
4.4.80.0030.2608.18
4.4.70.0000.2378.18
4.4.60.0000.2838.18
4.4.50.0030.2478.18
4.4.40.0000.3238.18
4.4.30.0030.2808.18
4.4.20.0030.3038.18
4.4.10.0030.2808.18
4.4.00.0000.2908.18
4.3.110.0000.2838.18
4.3.100.0000.3078.18
4.3.90.0000.2938.18
4.3.80.0000.2738.18
4.3.70.0000.2838.18
4.3.60.0030.2878.18
4.3.50.0000.2938.18
4.3.40.0000.2908.18
4.3.30.0030.2578.18
4.3.20.0000.2738.18
4.3.10.0070.2908.18
4.3.00.0070.2878.18

preferences:
33.91 ms | 401 KiB | 5 Q