3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NonEmptySetter { public function __set($name, $value) { $this->{$name} = $value; } } class EmptySetter { public function __set($name, $value) {} } function benchmark($obj) { $start_time = microtime(TRUE); for ($i = 0; $i < 100; $i++) { $obj->foo = 42; } return microtime(TRUE) - $start_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.0060.01014.73
7.4.00.0100.00714.94
7.3.130.0060.01314.62
7.3.120.0090.00914.62
7.3.110.0130.00614.65
7.3.100.0090.00614.61
7.3.90.0040.00814.46
7.3.80.0040.00414.67
7.3.70.0110.00414.61
7.3.60.0030.00614.54
7.3.50.0100.00714.51
7.3.40.0070.01014.54
7.3.30.0030.01014.64
7.3.20.0040.01116.59
7.3.10.0070.00716.52
7.3.00.0060.00616.28
7.2.260.0070.01114.72
7.2.250.0080.00814.54
7.2.240.0040.01114.69
7.2.230.0040.01514.42
7.2.220.0060.01314.82
7.2.210.0080.00314.68
7.2.200.0110.00314.39
7.2.190.0100.00714.77
7.2.180.0070.01114.74
7.2.170.0030.01314.96
7.2.160.0070.00714.96
7.2.150.0070.00716.57
7.2.140.0030.00616.59
7.2.130.0110.00416.64
7.2.120.0090.00916.60
7.2.110.0060.00616.27
7.2.100.0040.01116.81
7.2.90.0060.00616.76
7.2.80.0120.00316.84
7.2.70.0040.01116.88
7.2.60.0060.01216.54
7.2.50.0120.00916.52
7.2.40.0120.00016.70
7.2.30.0030.01216.44
7.2.20.0040.00416.60
7.2.10.0070.00416.63
7.2.00.0080.00516.59
7.1.330.0000.00815.60
7.1.320.0100.00315.39
7.1.310.0090.00615.46
7.1.300.0080.00815.71
7.1.290.0000.01215.27
7.1.280.0080.00315.29
7.1.270.0040.01115.57
7.1.260.0070.00315.51
7.1.250.0000.01415.37
7.1.240.0060.00915.38
7.1.230.0030.01015.56
7.1.220.0120.00315.59
7.1.210.0100.00315.54
7.1.200.0060.00615.33
7.1.190.0030.01015.51
7.1.180.0090.00915.47
7.1.170.0100.00715.77
7.1.160.0040.00815.34
7.1.150.0030.01215.45
7.1.140.0060.00815.75
7.1.130.0070.00315.65
7.1.120.0070.00715.52
7.1.110.0040.01215.44
7.1.100.0030.01415.66
7.1.90.0000.01115.39
7.1.80.0110.00315.53
7.1.70.0000.01116.25
7.1.60.0070.01317.66
7.1.50.0100.01016.22
7.1.40.0000.01015.49
7.1.30.0100.00315.36
7.1.20.0070.00315.68
7.1.10.0000.01615.64
7.1.00.0030.04418.85
7.0.330.0030.01015.42
7.0.320.0000.01415.20
7.0.310.0030.01015.21
7.0.300.0070.01115.33
7.0.290.0000.01315.25
7.0.280.0030.00615.19
7.0.270.0070.00715.02
7.0.260.0040.00715.21
7.0.250.0070.00715.32
7.0.240.0030.00615.32
7.0.230.0070.00715.41
7.0.220.0040.00815.31
7.0.210.0030.01015.23
7.0.200.0060.00615.74
7.0.190.0060.00315.37
7.0.180.0040.01115.44
7.0.170.0030.01015.22
7.0.160.0040.00715.41
7.0.150.0000.01215.35
7.0.140.0070.03618.65
7.0.130.0120.00615.37
7.0.120.0000.01915.34
7.0.110.0080.00815.47
7.0.100.0160.00315.36
7.0.90.0060.01215.32
7.0.80.0040.01515.45
7.0.70.0070.00715.11
7.0.60.0070.04417.65
7.0.50.0020.04816.60
7.0.40.0030.03316.45
7.0.30.0150.05016.68
7.0.20.0150.02216.68
7.0.10.0070.02716.79
7.0.00.0020.05016.64
5.6.400.0000.00913.93
5.6.390.0110.00414.13
5.6.380.0090.00613.79
5.6.370.0090.00014.08
5.6.360.0040.00713.89
5.6.350.0040.00413.93
5.6.340.0000.01214.36
5.6.330.0090.00614.26
5.6.320.0090.00614.05
5.6.310.0030.00614.20
5.6.300.0160.00313.79
5.6.290.0110.00814.38
5.6.280.0030.04417.63
5.6.270.0110.01114.02
5.6.260.0090.01214.09
5.6.250.0110.00914.25
5.6.240.0070.01114.41
5.6.230.0000.01614.30
5.6.220.0030.01314.16
5.6.210.0070.04517.31
5.6.200.0100.03816.06
5.6.190.0000.02817.31
5.6.180.0100.04617.27
5.6.170.0190.04217.24
5.6.160.0080.04017.20
5.6.150.0000.02816.11
5.6.140.0090.04516.15
5.6.130.0090.02316.13
5.6.120.0030.03117.63
5.6.110.0030.04517.56
5.6.100.0050.04617.51
5.6.90.0100.02817.64
5.6.80.0100.01717.08
5.6.70.0070.00714.25
5.6.60.0000.01114.14
5.6.50.0000.01413.84
5.6.40.0000.01414.07
5.6.30.0040.00713.80
5.6.20.0070.00713.84
5.6.10.0070.00314.23
5.6.00.0060.00614.31
5.5.380.0000.01414.22
5.5.370.0060.00914.02
5.5.360.0000.01313.73
5.5.350.0030.04517.34
5.5.340.0050.04516.06
5.5.330.0080.04517.02
5.5.320.0100.02417.06
5.5.310.0220.04517.13
5.5.300.0100.04016.13
5.5.290.0080.03216.13
5.5.280.0020.04917.38
5.5.270.0030.02517.44
5.5.260.0100.04217.42
5.5.250.0050.04517.27
5.5.240.0040.04016.99
5.5.230.0100.00714.11
5.5.220.0110.00313.92
5.5.210.0040.00813.89
5.5.200.0030.01414.05
5.5.190.0000.00913.93
5.5.180.0040.01214.03
5.5.170.0090.00313.79
5.5.160.0070.00713.84
5.5.150.0000.01413.96
5.5.140.0030.01214.02
5.5.130.0000.01514.05
5.5.120.0030.01014.15
5.5.110.0060.00614.18
5.5.100.0000.00814.10
5.5.90.0030.01013.50
5.5.80.0110.00413.72
5.5.70.0030.01213.75
5.5.60.0030.00914.12
5.5.50.0030.00913.74
5.5.40.0060.00314.15
5.5.30.0070.00313.82
5.5.20.0130.00314.11
5.5.10.0090.00313.84
5.5.00.0070.00713.48
5.4.450.0350.02615.62
5.4.440.0260.03715.58
5.4.430.0080.02715.59
5.4.420.0090.02715.55
5.4.410.0080.02915.54
5.4.400.0030.03215.21
5.4.390.0050.03115.05
5.4.380.0170.03315.19
5.4.370.0130.02815.08
5.4.360.0140.03115.20
5.4.350.0100.03415.06
5.4.340.0130.02715.17
5.4.330.0000.00811.64
5.4.320.0090.02012.08
5.4.310.0070.02412.07
5.4.300.0060.02112.08
5.4.290.0030.02312.07
5.4.280.0030.02312.02
5.4.270.0040.03715.32
5.4.260.0080.03615.30
5.4.250.0060.03315.19
5.4.240.0140.03315.27
5.4.230.0060.03215.28
5.4.220.0060.04315.34
5.4.210.0140.03115.24
5.4.200.0030.02815.19
5.4.190.0070.03015.30
5.4.180.0050.04015.24
5.4.170.0080.03015.36
5.4.160.0070.04315.36
5.4.150.0140.02315.24
5.4.140.0110.02414.13
5.4.130.0100.03114.12
5.4.120.0050.03014.08
5.4.110.0030.03014.03
5.4.100.0070.03014.03
5.4.90.0070.02714.10
5.4.80.0200.03014.16
5.4.70.0060.02314.03
5.4.60.0100.02514.02
5.4.50.0050.03014.02
5.4.40.0070.02913.99
5.4.30.0050.03214.13
5.4.20.0090.02514.03
5.4.10.0100.03214.08
5.4.00.0060.02813.81
5.3.290.0050.02112.22
5.3.280.0050.03513.12
5.3.270.0020.03713.08
5.3.260.0050.03213.13
5.3.250.0070.03513.21
5.3.240.0080.03713.20
5.3.230.0070.02713.23
5.3.220.0060.02913.19
5.3.210.0020.03613.10
5.3.200.0140.02313.14
5.3.190.0050.03613.22
5.3.180.0070.02513.14
5.3.170.0050.02913.10
5.3.160.0050.04313.19
5.3.150.0070.03813.10
5.3.140.0080.03713.19
5.3.130.0070.03713.09
5.3.120.0120.03513.17
5.3.110.0080.03413.18
5.3.100.0050.02812.95
5.3.90.0080.03012.92
5.3.80.0070.03812.84
5.3.70.0030.03212.87
5.3.60.0080.02912.86
5.3.50.0090.02712.88
5.3.40.0050.04012.83
5.3.30.0070.03712.77
5.3.20.0030.02812.68
5.3.10.0100.03512.60
5.3.00.0070.02312.56
5.2.170.0030.04711.30
5.2.160.0030.05711.23
5.2.150.0030.04711.13
5.2.140.0070.04311.21
5.2.130.0070.06311.20
5.2.120.0030.04711.26
5.2.110.0130.04311.09
5.2.100.0100.05311.08
5.2.90.0100.03711.18
5.2.80.0030.04311.17
5.2.70.0070.04011.08
5.2.60.0100.05311.07
5.2.50.0100.05711.12
5.2.40.0130.04311.09
5.2.30.0070.05710.95
5.2.20.0030.04011.14
5.2.10.0100.03310.93
5.2.00.0000.04710.71
5.1.60.0030.05010.07
5.1.50.0070.03010.00
5.1.40.0130.0309.98
5.1.30.0030.04710.17
5.1.20.0030.03710.42
5.1.10.0070.04310.27
5.1.00.0030.04010.16
5.0.50.0070.0378.39
5.0.40.0000.0308.51
5.0.30.0030.0438.32
5.0.20.0030.0278.04
5.0.10.0100.0278.28
5.0.00.0070.0408.26
4.4.90.0030.0236.82
4.4.80.0100.0236.82
4.4.70.0070.0206.82
4.4.60.0000.0276.82
4.4.50.0000.0336.82
4.4.40.0000.0376.82
4.4.30.0030.0236.82
4.4.20.0070.0276.82
4.4.10.0030.0306.82
4.4.00.0030.0476.82
4.3.110.0030.0206.82
4.3.100.0100.0176.82
4.3.90.0070.0206.82
4.3.80.0000.0336.82
4.3.70.0070.0276.82
4.3.60.0070.0176.82
4.3.50.0130.0206.82
4.3.40.0030.0336.82
4.3.30.0000.0276.82
4.3.20.0000.0236.82
4.3.10.0000.0276.82
4.3.00.0100.0206.99

preferences:
47.93 ms | 401 KiB | 5 Q