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"; $name = (new ReflectionClass($foo))->getName(); $start = microtime(true); for($i=0; $i<$rounds; $i++) { $name; } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $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.4.10.0070.33514.70
7.4.00.0100.22714.68
7.3.130.0030.43014.71
7.3.120.0070.43714.67
7.3.110.0070.45014.71
7.3.100.0000.26014.80
7.3.90.0070.35014.95
7.3.80.0070.28014.66
7.3.70.0070.40514.67
7.3.60.0030.25614.66
7.3.50.0070.42214.85
7.3.40.0100.25714.96
7.3.30.0070.40414.50
7.3.20.0000.35416.32
7.3.10.0000.28016.48
7.3.00.0000.42016.60
7.2.260.0100.50614.84
7.2.250.0100.35614.93
7.2.240.0030.44114.91
7.2.230.0130.35715.00
7.2.220.0070.44714.77
7.2.210.0100.34014.90
7.2.200.0030.37114.59
7.2.190.0070.42614.94
7.2.180.0030.41915.09
7.2.170.0000.35114.81
7.2.160.0030.40114.63
7.2.150.0030.47316.48
7.2.140.0070.48616.81
7.2.130.0030.36916.64
7.2.120.0070.51816.62
7.2.110.0030.36316.80
7.2.100.0000.35016.64
7.2.90.0100.35217.02
7.2.80.0030.47816.62
7.2.70.0070.51016.88
7.2.60.0000.43616.89
7.2.50.0000.39916.75
7.2.40.0070.50716.64
7.2.30.0030.40516.65
7.2.20.0030.39016.57
7.2.10.0000.52216.85
7.2.00.0030.33618.18
7.1.330.0070.64015.67
7.1.320.0070.56715.70
7.1.310.0030.53515.34
7.1.300.0030.72015.59
7.1.290.0030.55815.62
7.1.280.0030.55615.63
7.1.270.0000.51715.61
7.1.260.0100.67815.62
7.1.250.0030.70815.26
7.1.240.0070.55615.45
7.1.230.0000.56315.81
7.1.220.0070.62715.70
7.1.210.0070.59615.56
7.1.200.0090.68715.92
7.1.190.0030.73915.48
7.1.180.0030.59615.61
7.1.170.0000.55215.33
7.1.160.0070.67415.50
7.1.150.0030.69415.59
7.1.140.0070.61415.76
7.1.130.0000.70615.82
7.1.120.0070.75115.77
7.1.110.0000.74815.61
7.1.100.0030.57015.75
7.1.90.0070.50815.54
7.1.80.0000.69715.43
7.1.70.0170.53216.42
7.1.60.0120.56417.69
7.1.50.0050.42016.07
7.1.40.0090.54215.69
7.1.30.0030.69615.68
7.1.20.0100.70315.77
7.1.10.0000.55515.35
7.1.00.0000.57118.93
7.0.330.0070.56815.09
7.0.320.0100.67515.49
7.0.310.0030.56415.27
7.0.300.0030.57615.29
7.0.290.0030.57814.99
7.0.280.0030.60415.14
7.0.270.0030.54814.97
7.0.260.0030.75915.24
7.0.250.0070.74515.27
7.0.240.0030.62115.12
7.0.230.0070.74115.47
7.0.220.0070.53315.44
7.0.210.0030.69915.49
7.0.200.0030.55015.99
7.0.190.0030.62215.52
7.0.180.0030.72815.04
7.0.170.0000.72015.40
7.0.160.0000.62915.22
7.0.150.0000.60015.31
7.0.140.0050.52118.70
7.0.130.0030.75415.36
7.0.120.0100.73215.29
7.0.110.0070.61415.36
7.0.100.0030.68815.31
7.0.90.0030.55815.32
7.0.80.0130.78615.29
7.0.70.0080.60117.52
7.0.60.0130.47617.57
7.0.50.0050.49717.85
7.0.40.0030.57516.68
7.0.30.0070.54816.67
7.0.20.0130.48116.78
7.0.10.0100.58416.81
7.0.00.0080.60116.79
5.6.400.0101.48014.48
5.6.390.0031.37314.59
5.6.380.0031.16813.92
5.6.370.0001.20714.42
5.6.360.0031.22714.54
5.6.350.0031.35013.98
5.6.340.0071.57614.51
5.6.330.0061.38814.06
5.6.320.0101.16814.09
5.6.310.0071.18614.22
5.6.300.0031.45514.11
5.6.290.0031.21414.39
5.6.280.0051.13917.63
5.6.270.0001.39314.32
5.6.260.0031.46414.26
5.6.250.0001.44814.16
5.6.240.0071.66814.24
5.6.230.0031.59514.13
5.6.220.0070.96317.53
5.6.210.0021.17317.39
5.6.200.0071.16517.54
5.6.190.0030.99617.64
5.6.180.0051.10817.50
5.6.170.0071.11317.42
5.6.160.0071.06817.69
5.6.150.0031.04317.61
5.6.140.0071.17817.56
5.6.130.0071.09917.64
5.6.120.0101.09217.70
5.6.110.0121.13317.40
5.6.100.0101.13517.64
5.6.90.0031.09617.83
5.6.80.0051.14817.31
5.6.70.0030.93117.24
5.6.60.0101.13217.26
5.6.50.0071.02217.21
5.6.40.0031.19017.26
5.6.30.0080.98617.03
5.6.20.0081.19717.10
5.6.10.0021.09017.16
5.6.00.0020.92317.21
5.5.380.0031.47614.36
5.5.370.0071.12014.19
5.5.360.0031.19917.35
5.5.350.0051.03417.16
5.5.340.0051.11917.53
5.5.330.0081.10517.63
5.5.320.0020.98017.47
5.5.310.0071.04517.60
5.5.300.0071.06117.46
5.5.290.0021.06117.48
5.5.280.0051.24417.67
5.5.270.0081.08017.71
5.5.260.0071.11217.65
5.5.250.0021.08117.27
5.5.240.0071.20017.38
5.5.230.0051.13817.19
5.5.220.0051.22317.18
5.5.210.0031.10117.32
5.5.200.0050.99117.21
5.5.190.0101.17017.23
5.5.180.0071.07617.02
5.5.170.0031.42914.38
5.5.160.0020.98416.97
5.5.150.0071.19617.08
5.5.140.0021.07317.33
5.5.130.0031.12617.26
5.5.120.0080.94917.07
5.5.110.0051.18016.86
5.5.100.0030.98917.12
5.5.90.0080.97117.10
5.5.80.0071.07116.90
5.5.70.0081.02617.04
5.5.60.0101.17917.01
5.5.50.0071.12116.92
5.5.40.0051.09317.10
5.5.30.0121.17217.10
5.5.20.0051.01917.03
5.5.10.0071.00016.93
5.5.00.0071.05917.03
5.4.450.0051.09715.26
5.4.440.0080.98515.03
5.4.430.0101.07915.29
5.4.420.0081.17315.14
5.4.410.0031.15415.36
5.4.400.0020.99115.02
5.4.390.0030.97115.14
5.4.380.0021.04514.98
5.4.370.0031.16715.13
5.4.360.0071.25315.08
5.4.350.0021.12115.03
5.4.340.0051.12714.99
5.4.330.0031.52910.67
5.4.320.0001.25215.07
5.4.310.0051.16914.99
5.4.300.0051.13514.94
5.4.290.0051.10014.93
5.4.280.0051.21814.79
5.4.270.0031.13814.93
5.4.260.0071.08314.98
5.4.250.0051.17715.11
5.4.240.0051.20714.79
5.4.230.0071.05814.86
5.4.220.0031.19315.02
5.4.210.0051.04014.83
5.4.200.0081.08314.80
5.4.190.0081.22314.86
5.4.180.0121.11115.00
5.4.170.0021.15014.73
5.4.160.0081.20614.94
5.4.150.0081.01514.79
5.4.140.0081.19113.47
5.4.130.0081.17413.63
5.4.120.0031.23413.72
5.4.110.0051.06213.54
5.4.100.0051.20813.61
5.4.90.0031.00113.59
5.4.80.0051.03113.63
5.4.70.0101.08413.80
5.4.60.0031.16513.66
5.4.50.0050.94113.49
5.4.40.0050.97813.56
5.4.30.0021.03313.48
5.4.20.0020.92713.77
5.4.10.0020.86913.82
5.4.00.0030.91113.29
5.3.290.0040.02912.57
5.3.280.0030.04512.46
5.3.270.0070.02212.40
5.3.260.0050.03212.37
5.3.250.0030.04212.32
5.3.240.0050.03812.30
5.3.230.0030.04512.44
5.3.220.0100.03312.43
5.3.210.0080.03812.32
5.3.200.0020.03512.41
5.3.190.0070.04212.46
5.3.180.0030.04012.50
5.3.170.0070.04512.48
5.3.160.0050.02012.36
5.3.150.0070.02012.44
5.3.140.0020.01812.46
5.3.130.0070.01512.51
5.3.120.0030.03812.46
5.3.110.0070.02512.36
5.3.100.0030.01812.09
5.3.90.0020.02212.15
5.3.80.0030.02112.22
5.3.70.0060.01812.07
5.3.60.0060.01312.21
5.3.50.0030.01712.02
5.3.40.0050.02212.08
5.3.30.0030.01811.96
5.3.20.0050.03012.07
5.3.10.0020.04011.85
5.3.00.0030.04011.84
5.2.170.0000.03012.25
5.2.160.0100.04012.25
5.2.150.0000.03012.25
5.2.140.0000.02712.25
5.2.130.0000.06312.25
5.2.120.0070.04712.25
5.2.110.0030.05012.25
5.2.100.0030.03012.25
5.2.90.0000.04012.25
5.2.80.0030.06712.25
5.2.70.0070.06312.25
5.2.60.0070.06012.25
5.2.50.0000.05312.25
5.2.40.0100.05012.25
5.2.30.0070.03712.25
5.2.20.0030.04012.25
5.2.10.0070.06312.25
5.2.00.0000.05012.25
5.1.60.0030.05312.25
5.1.50.0070.05312.25
5.1.40.0000.04012.25
5.1.30.0070.06012.25
5.1.20.0000.05312.25
5.1.10.0070.04012.25
5.1.00.0030.05012.25
5.0.50.0030.05012.25
5.0.40.0070.03012.25
5.0.30.0070.06312.25
5.0.20.0000.04712.25
5.0.10.0070.04312.25
5.0.00.0030.06312.25
4.4.90.0030.03712.25
4.4.80.0070.01712.25
4.4.70.0000.02712.25
4.4.60.0030.03712.25
4.4.50.0070.03012.25
4.4.40.0070.05312.25
4.4.30.0000.02712.25
4.4.20.0070.02012.25
4.4.10.0070.03712.25
4.4.00.0000.05312.25
4.3.110.0100.03012.25
4.3.100.0000.03712.25
4.3.90.0000.03712.25
4.3.80.0000.05312.25
4.3.70.0030.03012.25
4.3.60.0030.03712.25
4.3.50.0000.03712.25
4.3.40.0070.03312.25
4.3.30.0000.02012.25
4.3.20.0000.03712.25
4.3.10.0070.03312.25
4.3.00.0070.03012.25

preferences:
33.11 ms | 401 KiB | 5 Q