3v4l.org

run code in 300+ PHP versions simultaneously
<?php class EmptySetter { public function __set($name, $value) {} } class NonEmptySetter { public function __set($name, $value) { $this->{$name} = $value; } } function benchmark($obj) { $start_time = microtime(TRUE); for ($i = 0; $i < 10000000; $i++) { $obj->foo = 42; } return microtime(TRUE) - $start_time; } printf("EmptySetter: %.2f seconds\n", benchmark(new EmptySetter)); printf("NonEmptySetter: %.2f seconds\n", benchmark(new NonEmptySetter));

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.00.0070.92014.87
7.3.120.0071.36214.86
7.3.110.0070.85114.74
7.3.100.0100.84714.67
7.3.90.0031.27114.90
7.3.80.0101.18214.73
7.3.70.0071.27114.74
7.3.60.0031.29415.02
7.3.50.0071.38214.96
7.3.40.0001.34514.53
7.3.30.0071.38014.80
7.3.20.0030.86316.35
7.3.10.0071.31216.50
7.3.00.0001.13416.75
7.2.250.0031.72014.98
7.2.240.0031.35215.11
7.2.230.0071.37514.90
7.2.220.0031.28515.12
7.2.210.0071.27315.13
7.2.200.0031.52615.08
7.2.190.0071.06714.99
7.2.180.0061.35814.79
7.2.170.0071.05715.12
7.2.160.0000.99014.67
7.2.150.0031.70717.05
7.2.140.0031.70916.93
7.2.130.0031.61717.13
7.2.120.0001.62516.68
7.2.110.0031.10816.97
7.2.100.0071.59617.01
7.2.90.0071.64916.73
7.2.80.0101.04516.92
7.2.70.0001.72116.98
7.2.60.0071.72416.96
7.2.50.0130.93316.73
7.2.40.0001.67216.91
7.2.30.0031.77316.94
7.2.20.0001.79316.75
7.2.10.0101.73116.63
7.2.00.0050.97418.05
7.1.330.0072.20915.86
7.1.320.0032.13315.77
7.1.310.0031.85315.63
7.1.300.0072.39915.78
7.1.290.0031.93715.79
7.1.280.0032.27415.93
7.1.270.0072.16715.74
7.1.260.0001.79615.79
7.1.250.0031.82815.57
7.1.240.0032.03115.79
7.1.230.0032.25015.77
7.1.220.0032.38215.51
7.1.210.0072.17315.81
7.1.200.0032.04215.55
7.1.190.0102.18715.88
7.1.180.0102.29315.64
7.1.170.0072.21415.80
7.1.160.0002.42515.72
7.1.150.0072.24616.00
7.1.140.0071.96615.91
7.1.130.0072.22215.51
7.1.120.0032.41215.79
7.1.110.0002.29815.90
7.1.100.0072.26215.50
7.1.90.0071.63815.93
7.1.80.0032.20415.68
7.1.70.0021.31316.45
7.1.60.0071.58417.80
7.1.50.0081.64216.44
7.1.40.0072.04315.93
7.1.30.0001.96115.64
7.1.20.0032.11615.81
7.1.10.0031.87615.79
7.1.00.0031.64919.04
7.0.330.0132.48415.43
7.0.320.0032.49515.28
7.0.310.0032.49415.19
7.0.300.0101.98815.29
7.0.290.0032.32215.39
7.0.280.0071.93015.38
7.0.270.0032.18215.51
7.0.260.0072.21915.55
7.0.250.0002.35115.37
7.0.240.0002.49915.33
7.0.230.0032.49515.08
7.0.220.0062.28015.19
7.0.210.0072.49215.43
7.0.200.0021.83016.00
7.0.190.0032.49415.51
7.0.180.0032.49615.45
7.0.170.0032.40715.49
7.0.160.0032.49615.14
7.0.150.0002.49915.54
7.0.140.0052.13218.79
7.0.130.0072.26715.39
7.0.120.0032.49515.13
7.0.110.0072.49115.24
7.0.100.0032.49515.39
7.0.90.0032.49615.35
7.0.80.0032.49615.41
7.0.70.0132.48615.47
7.0.60.0051.70617.55
7.0.50.0071.59416.75
7.0.40.0071.80016.63
7.0.30.0181.83716.86
7.0.20.0241.78916.86
7.0.10.0121.83916.83
7.0.00.0071.84216.91
5.6.400.0032.48914.61
5.6.390.0002.49814.42
5.6.380.0002.49714.37
5.6.370.0072.49214.71
5.6.360.0002.49914.19
5.6.350.0002.49714.16
5.6.340.0002.49914.38
5.6.330.0072.49214.20
5.6.320.0102.48914.63
5.6.310.0032.48414.04
5.6.300.0002.49714.47
5.6.290.0202.47714.39
5.6.280.0022.49817.77
5.6.270.0102.48914.16
5.6.260.0062.48614.45
5.6.250.0002.49814.00
5.6.240.0032.49314.33
5.6.230.0072.49214.27
5.6.220.0032.49314.52
5.6.210.0032.49517.48
5.6.200.0072.49316.22
5.6.190.0052.49217.46
5.6.180.0272.47317.44
5.6.170.0052.49417.38
5.6.160.0022.49817.21
5.6.150.0052.49116.14
5.6.140.0122.48816.27
5.6.130.0032.49616.25
5.6.120.0052.49517.79
5.6.110.0002.49617.82
5.6.100.0072.49317.65
5.6.90.0052.49517.59
5.6.80.0032.49617.42
5.6.70.0032.49514.07
5.6.60.0032.49514.25
5.6.50.0072.48514.45
5.6.40.0002.49514.37
5.6.30.0032.49614.27
5.6.20.0072.49314.07
5.6.10.0032.48914.14
5.6.00.0132.48314.23
5.5.380.0102.48614.43
5.5.370.0002.49914.58
5.5.360.0072.49214.30
5.5.350.0182.42817.44
5.5.340.0072.49016.11
5.5.330.0122.46917.82
5.5.320.1652.33417.23
5.5.310.0072.47217.59
5.5.300.0072.47816.15
5.5.290.0082.49116.20
5.5.280.0072.49217.44
5.5.270.0302.42217.67
5.5.260.0082.49117.49
5.5.250.0072.49217.51
5.5.240.0022.39217.09
5.5.230.0002.49914.08
5.5.220.0072.49214.58
5.5.210.0102.48814.39
5.5.200.0102.48914.09
5.5.190.0072.49214.13
5.5.180.0002.49814.30
5.5.170.0002.49714.27
5.5.160.0072.49214.53
5.5.150.0002.49714.24
5.5.140.0132.46114.39
5.5.130.0102.48914.27
5.5.120.0002.45714.23
5.5.110.0032.49514.22
5.5.100.0072.42913.98
5.5.90.0072.44914.35
5.5.80.0072.46014.43
5.5.70.0062.42114.02
5.5.60.0092.47414.11
5.5.50.0002.49814.45
5.5.40.0032.49614.42
5.5.30.0072.49213.85
5.5.20.0032.49514.34
5.5.10.0032.49614.35
5.5.00.0032.49413.95
5.4.450.0172.42015.92
5.4.440.0102.45815.93
5.4.430.0072.46415.92
5.4.420.0052.48415.93
5.4.410.0102.44415.87
5.4.400.0122.46015.69
5.4.390.0172.43315.68
5.4.380.0082.46215.79
5.4.370.0022.47415.74
5.4.360.0102.44115.77
5.4.350.0082.48415.84
5.4.340.0032.47615.77
5.4.330.0032.49512.47
5.4.320.0102.47215.69
5.4.310.0122.46515.77
5.4.300.0102.47615.83
5.4.290.0152.45515.69
5.4.280.0102.45615.77
5.4.270.0182.45515.77
5.4.260.0082.45415.66
5.4.250.0102.46615.75
5.4.240.0052.47915.75
5.4.230.0132.47415.75
5.4.220.0072.47115.84
5.4.210.0132.47215.67
5.4.200.0072.45815.68
5.4.190.0102.47115.71
5.4.180.0172.45915.82
5.4.170.0182.45815.68
5.4.160.0082.46415.76
5.4.150.0072.44415.68
5.4.140.0072.46414.46
5.4.130.0172.45514.45
5.4.120.0072.45114.41
5.4.110.0032.48414.37
5.4.100.0122.46614.40
5.4.90.0052.48014.48
5.4.80.0172.45714.49
5.4.70.0082.46814.50
5.4.60.0072.38114.49
5.4.50.0132.17614.43
5.4.40.0102.39114.48
5.4.30.0082.46314.48
5.4.20.0132.46114.43
5.4.10.0052.46914.46
5.4.00.0032.46914.19
5.3.290.0102.46913.50
5.3.280.0032.46013.46
5.3.270.0172.45213.47
5.3.260.0082.47813.45
5.3.250.0072.47613.48
5.3.240.0132.46613.44
5.3.230.0292.42713.44
5.3.220.0052.47813.44
5.3.210.0082.46913.45
5.3.200.0132.45413.44
5.3.190.0052.45813.45
5.3.180.0052.48813.42
5.3.170.0222.44913.43
5.3.160.0072.18513.37
5.3.150.0132.24013.37
5.3.140.0182.19513.50
5.3.130.0112.46113.43
5.3.120.0182.46213.42
5.3.110.0072.47913.49
5.3.100.0082.47313.18
5.3.90.0172.41913.17
5.3.80.0082.34313.14
5.3.70.0102.16213.15
5.3.60.0122.27113.13
5.3.50.0072.24013.09
5.3.40.0002.47113.09
5.3.30.0102.47613.14
5.3.20.0132.45612.98
5.3.10.0072.46713.02
5.3.00.0132.31112.94
5.2.170.0402.07010.92
5.2.160.0132.37010.89
5.2.150.0232.40010.89
5.2.140.0202.42710.88
5.2.130.0072.44010.89
5.2.120.0072.44010.91
5.2.110.0132.37010.91
5.2.100.0271.97310.91
5.2.90.0132.01010.85
5.2.80.0231.95310.86
5.2.70.0102.15310.73
5.2.60.0202.42010.73
5.2.50.0102.20310.92
5.2.40.0132.02310.80
5.2.30.0371.96310.71
5.2.20.0072.08310.80
5.2.10.0172.14710.72
5.2.00.0202.41310.57
5.1.60.0072.4279.83
5.1.50.0032.4409.82
5.1.40.0002.4709.85
5.1.30.0072.45710.30
5.1.20.0132.45710.15
5.1.10.0172.4309.91
5.1.00.0302.4379.93
5.0.50.0072.4708.46
5.0.40.0202.4478.15
5.0.30.0102.4378.12
5.0.20.0032.4608.08
5.0.10.0102.4438.09
5.0.00.0132.4478.05
4.4.90.0000.0336.85
4.4.80.0030.0206.85
4.4.70.0030.0236.85
4.4.60.0070.0236.85
4.4.50.0000.0236.85
4.4.40.0000.0436.85
4.4.30.0030.0276.85
4.4.20.0070.0276.85
4.4.10.0070.0276.85
4.4.00.0000.0376.85
4.3.110.0070.0236.85
4.3.100.0030.0236.85
4.3.90.0070.0236.85
4.3.80.0000.0376.85
4.3.70.0130.0136.85
4.3.60.0100.0206.85
4.3.50.0030.0206.85
4.3.40.0000.0476.85
4.3.30.0000.0276.85
4.3.20.0070.0276.85
4.3.10.0030.0276.85
4.3.00.0100.0207.00

preferences:
38.03 ms | 401 KiB | 5 Q