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($class_name) { $start_time = microtime(TRUE); for ($i = 0; $i < 1; $i++) { $obj = new $class_name(); $obj->foo = 42; echo $obj->foo; } return microtime(TRUE) - $start_time; } printf("EmptySetter: %.2f seconds\n", benchmark('EmptySetter'));

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.0080.01214.64
7.3.120.0030.01414.26
7.3.110.0060.01214.96
7.3.100.0090.00914.44
7.3.90.0000.01615.03
7.3.80.0030.01014.72
7.3.70.0150.00014.80
7.3.60.0030.01014.58
7.3.50.0040.01114.63
7.3.40.0000.01314.67
7.3.30.0040.00814.42
7.3.20.0080.00416.21
7.3.10.0100.00316.64
7.3.00.0100.00016.79
7.2.250.0070.01314.86
7.2.240.0030.01314.95
7.2.230.0080.00814.95
7.2.220.0030.01515.02
7.2.210.0060.00914.92
7.2.200.0060.00614.95
7.2.190.0030.01014.90
7.2.180.0100.00714.66
7.2.170.0060.00615.17
7.2.160.0000.01315.04
7.2.150.0030.01317.09
7.2.140.0060.00816.90
7.2.130.0040.01216.84
7.2.120.0070.00416.78
7.2.110.0030.01216.71
7.2.100.0030.01316.75
7.2.90.0110.00316.93
7.2.80.0120.00016.89
7.2.70.0040.01116.91
7.2.60.0070.01316.84
7.2.50.0030.00716.89
7.2.40.0070.00416.98
7.2.30.0090.00616.76
7.2.20.0040.01116.93
7.2.10.0040.01217.04
7.2.00.0080.00516.97
7.1.330.0070.01015.37
7.1.320.0030.01015.87
7.1.310.0030.01015.76
7.1.300.0000.00915.52
7.1.290.0060.00315.82
7.1.280.0090.00015.68
7.1.270.0000.01415.99
7.1.260.0060.00615.50
7.1.250.0100.00315.55
7.1.240.0040.00715.57
7.1.230.0070.00715.47
7.1.220.0040.01115.50
7.1.210.0000.01515.73
7.1.200.0080.00415.63
7.1.190.0070.00415.78
7.1.180.0090.00915.70
7.1.170.0080.00415.46
7.1.160.0040.00815.79
7.1.150.0070.00315.60
7.1.140.0060.00315.83
7.1.130.0070.01015.85
7.1.120.0090.00615.47
7.1.110.0070.00415.59
7.1.100.0030.00615.63
7.1.90.0040.00815.67
7.1.80.0100.00315.60
7.1.70.0020.00816.25
7.1.60.0100.00817.72
7.1.50.0130.00516.42
7.1.40.0120.00315.68
7.1.30.0000.01415.54
7.1.20.0070.00715.56
7.1.10.0070.00715.63
7.1.00.0100.03719.07
7.0.330.0070.00715.25
7.0.320.0030.00915.39
7.0.310.0030.00915.46
7.0.300.0030.01015.27
7.0.290.0040.00815.24
7.0.280.0100.00315.00
7.0.270.0030.01315.25
7.0.260.0060.00615.13
7.0.250.0060.00915.50
7.0.240.0070.00715.12
7.0.230.0090.00015.27
7.0.220.0060.00415.07
7.0.210.0040.00815.31
7.0.200.0070.00816.06
7.0.190.0110.00415.32
7.0.180.0040.00715.37
7.0.170.0040.00815.52
7.0.160.0060.00615.38
7.0.150.0120.00015.18
7.0.140.0090.03718.83
7.0.130.0000.01015.30
7.0.120.0000.01415.21
7.0.110.0090.00315.35
7.0.100.0160.02717.64
7.0.90.0120.04017.54
7.0.80.0090.04217.63
7.0.70.0060.04517.51
7.0.60.0090.04417.40
7.0.50.0130.03717.85
7.0.40.0120.04016.79
7.0.30.0070.04616.58
7.0.20.0080.04416.64
7.0.10.0030.02716.62
7.0.00.0080.04516.60
5.6.400.0000.00914.14
5.6.390.0040.00814.07
5.6.380.0080.00414.30
5.6.370.0000.01214.16
5.6.360.0030.00914.15
5.6.350.0090.00314.14
5.6.340.0070.01013.96
5.6.330.0090.00914.64
5.6.320.0060.01014.43
5.6.310.0100.00714.38
5.6.300.0040.00814.52
5.6.290.0030.00614.21
5.6.280.0090.03517.56
5.6.270.0100.00014.25
5.6.260.0090.00014.14
5.6.250.0070.02517.55
5.6.240.0080.04517.30
5.6.230.0050.03417.32
5.6.220.0080.04317.27
5.6.210.0080.04117.39
5.6.200.0050.05017.72
5.6.190.0060.03017.62
5.6.180.0120.03717.47
5.6.170.0100.04517.63
5.6.160.0060.02617.66
5.6.150.0070.04717.67
5.6.140.0130.03517.72
5.6.130.0080.04517.59
5.6.120.0030.03617.58
5.6.110.0080.04817.69
5.6.100.0080.02517.47
5.6.90.0060.02617.52
5.6.80.0110.03817.29
5.6.70.0080.02317.13
5.6.60.0080.03317.21
5.6.50.0090.02717.14
5.6.40.0020.05117.11
5.6.30.0180.04317.21
5.6.20.0030.03217.18
5.6.10.0080.04217.24
5.6.00.0110.02817.24
5.5.380.0090.02217.53
5.5.370.0050.04217.38
5.5.360.0120.01617.53
5.5.350.0060.03817.55
5.5.340.0060.04817.59
5.5.330.0150.03517.59
5.5.320.0090.02717.57
5.5.310.0220.01217.64
5.5.300.0090.04217.76
5.5.290.0080.04617.57
5.5.280.0100.04217.38
5.5.270.0090.03717.55
5.5.260.0100.04517.56
5.5.250.0050.03917.49
5.5.240.0070.04317.05
5.5.230.0060.04517.15
5.5.220.0090.04017.27
5.5.210.0080.04017.30
5.5.200.0090.02317.09
5.5.190.0000.05217.13
5.5.180.0100.04417.15
5.5.170.0080.00814.21
5.5.160.0060.03617.18
5.5.150.0080.03017.22
5.5.140.0070.02117.13
5.5.130.0110.02017.28
5.5.120.0060.02217.00
5.5.110.0070.02317.22
5.5.100.0020.02617.25
5.5.90.0050.02517.06
5.5.80.0070.01817.17
5.5.70.0070.02017.13
5.5.60.0050.02417.23
5.5.50.0060.01917.21
5.5.40.0000.02317.16
5.5.30.0070.01817.03
5.5.20.0030.02117.15
5.5.10.0060.02016.97
5.5.00.0120.03517.14
5.4.450.0110.03715.19
5.4.440.0110.03215.23
5.4.430.0050.03215.48
5.4.420.0050.03015.21
5.4.410.0060.03815.24
5.4.400.0030.03714.94
5.4.390.0070.03115.07
5.4.380.0110.02115.09
5.4.370.0050.02015.18
5.4.360.0050.03915.00
5.4.350.0050.02715.29
5.4.340.0050.04215.00
5.4.330.0030.01010.97
5.4.320.0070.02515.21
5.4.310.0110.02115.05
5.4.300.0050.02015.09
5.4.290.0030.02214.95
5.4.280.0050.02215.01
5.4.270.0030.02115.10
5.4.260.0010.02315.10
5.4.250.0050.02015.10
5.4.240.0040.02015.04
5.4.230.0070.01715.14
5.4.220.0030.02315.09
5.4.210.0030.02315.00
5.4.200.0030.02015.07
5.4.190.0020.03015.07
5.4.180.0070.01915.10
5.4.170.0050.03115.14
5.4.160.0050.03315.01
5.4.150.0130.01314.99
5.4.140.0030.02313.74
5.4.130.0040.01913.69
5.4.120.0050.01813.65
5.4.110.0020.02413.83
5.4.100.0080.01613.71
5.4.90.0080.01713.77
5.4.80.0030.02113.75
5.4.70.0030.01813.81
5.4.60.0040.01613.82
5.4.50.0020.02213.79
5.4.40.0050.03013.87
5.4.30.0000.02213.75
5.4.20.0050.01913.73
5.4.10.0120.01313.80
5.4.00.0050.01913.52
5.3.290.0020.04012.88
5.3.280.0070.01512.77
5.3.270.0030.03612.77
5.3.260.0070.01712.77
5.3.250.0010.02312.75
5.3.240.0070.01812.77
5.3.230.0000.02812.76
5.3.220.0060.01812.80
5.3.210.0040.02012.75
5.3.200.0070.02012.73
5.3.190.0010.02312.80
5.3.180.0050.02212.75
5.3.170.0050.02012.73
5.3.160.0030.02212.80
5.3.150.0050.02212.84
5.3.140.0050.01712.82
5.3.130.0030.02812.79
5.3.120.0030.01812.79
5.3.110.0020.02312.79
5.3.100.0030.02012.54
5.3.90.0040.01712.56
5.3.80.0000.02212.53
5.3.70.0050.01712.46
5.3.60.0070.01812.48
5.3.50.0020.01912.42
5.3.40.0010.01812.53
5.3.30.0030.02012.43
5.3.20.0060.01612.37
5.3.10.0030.02012.35
5.3.00.0050.03712.27
5.2.170.0000.03012.12
5.2.160.0030.02312.12
5.2.150.0030.02712.12
5.2.140.0070.03312.12
5.2.130.0030.02312.12
5.2.120.0000.02712.12
5.2.110.0070.02012.12
5.2.100.0000.04312.12
5.2.90.0030.05312.12
5.2.80.0100.05712.12
5.2.70.0070.03312.12
5.2.60.0030.06712.12
5.2.50.0000.06012.12
5.2.40.0070.02712.12
5.2.30.0100.05312.12
5.2.20.0030.05712.12
5.2.10.0100.02012.12
5.2.00.0100.04712.12
5.1.60.0000.04012.12
5.1.50.0000.05312.12
5.1.40.0030.04312.12
5.1.30.0000.05712.12
5.1.20.0030.03312.12
5.1.10.0030.04012.12
5.1.00.0030.05012.12
5.0.50.0030.04312.12
5.0.40.0030.02712.12
5.0.30.0030.02712.12
5.0.20.0000.03712.12
5.0.10.0030.02012.12
5.0.00.0030.06712.12
4.4.90.0000.02012.12
4.4.80.0000.03712.12
4.4.70.0030.03312.12
4.4.60.0030.02712.12
4.4.50.0070.03312.12
4.4.40.0100.03312.12
4.4.30.0030.02312.12
4.4.20.0000.03712.12
4.4.10.0100.03012.12
4.4.00.0100.04712.12
4.3.110.0000.03312.12
4.3.100.0030.03312.12
4.3.90.0100.02712.12
4.3.80.0070.05012.12
4.3.70.0030.03012.12
4.3.60.0100.02712.12
4.3.50.0070.02712.12
4.3.40.0000.04012.12
4.3.30.0030.02312.12
4.3.20.0000.03012.12
4.3.10.0030.02312.12
4.3.00.0000.02712.12

preferences:
38.49 ms | 401 KiB | 5 Q