3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar = 'baz'; } $foo = new Foo; $time = microtime(true); for ($i = 0; $i <= 10000; $i++) { $ref = new ReflectionClass($foo); $property = $ref->getProperty('bar'); $property->setAccessible(true); $property->getValue($foo); } echo microtime(true) - $time;

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.01714.93
7.4.00.0070.01515.05
7.3.130.0030.01714.84
7.3.120.0100.01615.12
7.3.110.0030.02614.86
7.3.100.0040.01814.88
7.3.90.0030.01714.71
7.3.80.0040.01515.18
7.3.70.0040.01814.64
7.3.60.0040.01814.52
7.3.50.0100.01014.45
7.3.40.0100.01014.75
7.3.30.0060.01314.77
7.3.20.0060.01616.75
7.3.10.0090.01116.57
7.3.00.0090.01416.71
7.2.260.0070.02415.18
7.2.250.0030.02415.01
7.2.240.0040.01915.05
7.2.230.0130.01614.95
7.2.220.0060.01514.91
7.2.210.0070.01715.07
7.2.200.0030.02315.17
7.2.190.0040.02114.92
7.2.180.0030.02415.25
7.2.170.0000.02515.14
7.2.160.0060.01914.74
7.2.150.0100.01917.18
7.2.140.0060.01917.12
7.2.130.0070.01716.97
7.2.120.0050.01716.95
7.2.110.0040.02216.96
7.2.100.0100.01316.77
7.2.90.0100.01316.84
7.2.80.0050.01716.97
7.2.70.0070.01516.87
7.2.60.0060.01816.88
7.2.50.0010.02016.72
7.2.40.0070.01616.67
7.2.30.0050.02017.05
7.2.20.0030.02316.79
7.2.10.0050.01616.92
7.2.00.0040.01617.84
7.1.330.0060.01915.71
7.1.320.0090.01515.86
7.1.310.0000.02415.93
7.1.300.0030.02515.84
7.1.290.0030.02415.82
7.1.280.0070.02015.92
7.1.270.0080.01515.59
7.1.260.0060.01515.97
7.1.250.0060.01715.63
7.1.240.0000.02315.94
7.1.230.0000.02415.93
7.1.220.0120.01215.94
7.1.210.0030.02315.97
7.1.200.0100.02315.79
7.1.190.0040.01815.79
7.1.180.0070.02115.89
7.1.170.0040.02115.95
7.1.160.0090.01515.67
7.1.150.0070.01715.73
7.1.140.0040.02215.44
7.1.130.0030.02015.96
7.1.120.0030.01516.00
7.1.110.0040.01815.93
7.1.100.0060.01315.96
7.1.90.0000.02315.68
7.1.80.0030.01715.88
7.1.70.0030.01416.63
7.1.60.0080.02217.69
7.1.50.0050.02316.45
7.1.40.0060.02215.71
7.1.30.0100.01315.88
7.1.20.0100.01415.92
7.1.10.0080.01515.70
7.1.00.0020.05819.09
7.0.330.0090.01915.38
7.0.320.0120.01215.48
7.0.310.0000.02415.34
7.0.300.0030.02515.36
7.0.290.0000.02015.29
7.0.280.0000.02415.56
7.0.270.0060.01915.48
7.0.260.0000.02215.50
7.0.250.0070.01815.34
7.0.240.0070.01315.60
7.0.230.0040.02215.43
7.0.220.0000.02415.58
7.0.210.0070.02015.43
7.0.200.0030.01815.26
7.0.190.0000.02415.49
7.0.180.0090.01515.33
7.0.170.0000.02415.23
7.0.160.0070.01715.40
7.0.150.0040.01815.50
7.0.140.0000.05618.75
7.0.130.0000.02415.14
7.0.120.0000.02215.36
7.0.110.0040.02215.50
7.0.100.0040.02115.34
7.0.90.0030.02115.42
7.0.80.0100.01615.21
7.0.70.0100.01915.22
7.0.60.0050.03717.53
7.0.50.0030.03416.59
7.0.40.0070.05716.63
7.0.30.0290.03616.89
7.0.20.0150.05816.86
7.0.10.0180.04716.76
7.0.00.0100.04816.82
5.6.400.0030.02914.60
5.6.390.0100.02314.53
5.6.380.0100.02314.30
5.6.370.0100.03214.38
5.6.360.0000.03614.35
5.6.350.0030.02914.66
5.6.340.0000.03114.61
5.6.330.0030.02914.27
5.6.320.0100.02314.23
5.6.310.0070.02314.27
5.6.300.0000.03214.52
5.6.290.0030.03014.27
5.6.280.0020.06217.62
5.6.270.0100.02614.60
5.6.260.0000.02814.37
5.6.250.0100.02014.08
5.6.240.0000.03014.39
5.6.230.0090.02814.24
5.6.220.0030.04114.52
5.6.210.0030.03917.60
5.6.200.0030.05716.15
5.6.190.0110.03817.42
5.6.180.1730.03817.25
5.6.170.0210.05417.55
5.6.160.0130.05517.56
5.6.150.0100.04316.20
5.6.140.0030.06016.24
5.6.130.0050.04916.21
5.6.120.0100.05917.80
5.6.110.0100.06117.60
5.6.100.0030.05917.71
5.6.90.0030.04917.65
5.6.80.0080.05617.30
5.6.70.0120.05817.22
5.6.60.0040.02913.98
5.6.50.0030.03014.08
5.6.40.0150.02214.21
5.6.30.0060.02514.15
5.6.20.0070.02314.50
5.6.10.0070.02914.35
5.6.00.0030.02414.25
5.5.380.0030.03014.23
5.5.370.0000.03014.40
5.5.360.0070.03814.31
5.5.350.0280.04817.40
5.5.340.0100.04816.13
5.5.330.0030.06317.21
5.5.320.0250.06017.33
5.5.310.0100.04017.18
5.5.300.0110.05516.05
5.5.290.0020.04616.11
5.5.280.0070.03417.50
5.5.270.0030.04817.46
5.5.260.0030.06917.64
5.5.250.0110.04917.48
5.5.240.2000.03617.26
5.5.230.0060.02514.41
5.5.220.0100.02614.15
5.5.210.0100.02414.46
5.5.200.0060.02214.21
5.5.190.0070.02414.36
5.5.180.0060.02514.34
5.5.170.0030.02714.18
5.5.160.0070.02514.21
5.5.150.0100.02313.81
5.5.140.0000.02814.36
5.5.130.0000.03414.23
5.5.120.0030.03714.14
5.5.110.0070.02814.06
5.5.100.0060.03214.32
5.5.90.0060.02214.01
5.5.80.0030.03414.27
5.5.70.0070.02914.03
5.5.60.0030.03114.02
5.5.50.0030.02514.31
5.5.40.0120.01814.01
5.5.30.0070.03714.18
5.5.20.0040.03214.41
5.5.10.0000.03414.39
5.5.00.0000.02714.04
5.4.450.0430.04915.54
5.4.440.0280.05215.54
5.4.430.0320.05715.58
5.4.420.0300.05015.57
5.4.410.0220.05315.38
5.4.400.0320.05115.40
5.4.390.0300.05315.39
5.4.380.0080.04815.17
5.4.370.0050.04115.08
5.4.360.0060.04215.18
5.4.350.0090.04211.83
5.4.340.0100.05011.82
5.4.330.0030.02711.64
5.4.320.0040.04112.07
5.4.310.0050.03612.07
5.4.300.0070.03812.07
5.4.290.0030.04412.06
5.4.280.0040.04312.01
5.4.270.0050.04312.02
5.4.260.0070.04412.01
5.4.250.0050.04712.01
5.4.240.0040.03812.02
5.4.230.0060.04012.01
5.4.220.0060.03612.01
5.4.210.0080.03512.01
5.4.200.0060.04012.01
5.4.190.0050.04012.01
5.4.180.0030.04512.01
5.4.170.0040.04212.02
5.4.160.0070.03812.02
5.4.150.0040.04712.01
5.4.140.0060.04311.85
5.4.130.0070.03811.85
5.4.120.0060.03611.82
5.4.110.0090.04711.83
5.4.100.0070.03811.82
5.4.90.0020.04111.82
5.4.80.0040.04011.82
5.4.70.0070.03611.82
5.4.60.0040.03811.82
5.4.50.0020.04011.82
5.4.40.0040.03911.81
5.4.30.0100.03311.81
5.4.20.0060.03911.81
5.4.10.0040.03711.81
5.4.00.0080.03611.56
5.3.290.0060.05812.80
5.3.280.0080.05412.71
5.3.270.0050.05812.72
5.3.260.0060.05712.72
5.3.250.0040.05612.72
5.3.240.0040.05812.72
5.3.230.0080.05512.71
5.3.220.0050.06012.68
5.3.210.0070.05712.68
5.3.200.0060.05812.68
5.3.190.0030.06012.68
5.3.180.0080.05312.67
5.3.170.0110.05112.67
5.3.160.0070.05512.67
5.3.150.0040.06512.67
5.3.140.0050.05712.66
5.3.130.0070.05312.66
5.3.120.0040.05812.65
5.3.110.0030.06012.66
5.3.100.0060.05512.12
5.3.90.0090.06412.09
5.3.80.0100.05112.10
5.3.70.0060.05412.09
5.3.60.0050.05412.07
5.3.50.0090.05912.02
5.3.40.0050.05312.02
5.3.30.0050.05311.98
5.3.20.0070.05211.76
5.3.10.0040.05211.73
5.3.00.0040.05411.71
5.2.170.0020.0329.21
5.2.160.0060.0279.21
5.2.150.0060.0289.21
5.2.140.0040.0329.21
5.2.130.0030.0309.18
5.2.120.0020.0329.17
5.2.110.0030.0319.18
5.2.100.0050.0289.18
5.2.90.0070.0269.18
5.2.80.0010.0349.17
5.2.70.0040.0309.17
5.2.60.0060.0289.13
5.2.50.0040.0339.09
5.2.40.0030.0349.07
5.2.30.0030.0309.04
5.2.20.0030.0299.04
5.2.10.0010.0318.94
5.2.00.0040.0298.81
5.1.60.0050.0238.09
5.1.50.0040.0258.08
5.1.40.0050.0238.06
5.1.30.0040.0268.41
5.1.20.0080.0238.44
5.1.10.0060.0248.16
5.1.00.0030.0278.16
5.0.50.0020.0236.64
5.0.40.0030.0196.50
5.0.30.0040.0316.31
5.0.20.0010.0216.27
5.0.10.0040.0196.26
5.0.00.0040.0326.25
4.4.90.0030.0154.78
4.4.80.0010.0174.76
4.4.70.0030.0154.75
4.4.60.0030.0144.76
4.4.50.0020.0154.77
4.4.40.0040.0294.71
4.4.30.0050.0244.76
4.4.20.0040.0154.85
4.4.10.0040.0154.85
4.4.00.0040.0284.76
4.3.110.0030.0154.67
4.3.100.0020.0154.66
4.3.90.0030.0154.63
4.3.80.0030.0304.58
4.3.70.0040.0184.63
4.3.60.0030.0204.63
4.3.50.0030.0174.63
4.3.40.0040.0224.54
4.3.30.0010.0183.30
4.3.20.0050.0133.28
4.3.10.0030.0143.24
4.3.00.0200.0277.01

preferences:
39.66 ms | 401 KiB | 5 Q