3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $id; public function __set($key, $value) { if (isset($this->$key)) $this->$key = $value; // throw new Exception() could be added here } public function __get($key) { return isset($this->$key) ? $this->$key : null; } public function __call($name, $arguments) { $matches = array(); $pattern = '/^set([A-Za-z0-9]+)/'; if (preg_match($pattern, $name, $matches)) { //var_dump($arguments, $matches); $method = strtolower($mwtches[1]); $this->$method($arguments[0]); } } } $test = new Test; $test->setId(25); var_dump($test);

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)
8.3.60.0000.01518.53
8.3.50.0120.00922.11
8.3.40.0120.00318.79
8.3.30.0070.00718.92
8.3.20.0050.00318.91
8.3.10.0040.00420.95
8.3.00.0080.00023.61
8.2.180.0110.00716.63
8.2.170.0120.00322.96
8.2.160.0130.00322.21
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.61
8.2.110.0060.00319.39
8.2.100.0090.00317.84
8.2.90.0090.00019.07
8.2.80.0000.00817.97
8.2.70.0050.00517.86
8.2.60.0000.00818.03
8.2.50.0000.00818.07
8.2.40.0040.00418.28
8.2.30.0000.00719.82
8.2.20.0050.00217.76
8.2.10.0040.00417.99
8.2.00.0030.00617.89
8.1.280.0090.00925.92
8.1.270.0090.00023.99
8.1.260.0080.00626.35
8.1.250.0080.00028.09
8.1.240.0030.00622.31
8.1.230.0030.00820.88
8.1.220.0060.00318.77
8.1.210.0030.00518.84
8.1.200.0030.00617.23
8.1.190.0040.00419.19
8.1.180.0000.00718.10
8.1.170.0000.00918.71
8.1.160.0000.00718.87
8.1.150.0040.00418.82
8.1.140.0060.00317.61
8.1.130.0070.00017.92
8.1.120.0070.00017.55
8.1.110.0000.00817.45
8.1.100.0030.00617.57
8.1.90.0040.00417.52
8.1.80.0050.00317.46
8.1.70.0030.00317.45
8.1.60.0040.00417.63
8.1.50.0080.00017.64
8.1.40.0080.00017.66
8.1.30.0030.00517.81
8.1.20.0040.00417.75
8.1.10.0080.00017.68
8.1.00.0070.00317.73
8.0.300.0080.00019.88
8.0.290.0080.00016.92
8.0.280.0030.00518.42
8.0.270.0030.00317.30
8.0.260.0000.00716.90
8.0.250.0080.00017.09
8.0.240.0060.00317.13
8.0.230.0000.00717.16
8.0.220.0000.00717.06
8.0.210.0030.00317.05
8.0.200.0000.00617.03
8.0.190.0020.00516.98
8.0.180.0050.00316.95
8.0.170.0040.00417.02
8.0.160.0040.00416.97
8.0.150.0000.00817.00
8.0.140.0000.00716.99
8.0.130.0030.00313.48
8.0.120.0040.00416.87
8.0.110.0110.00016.94
8.0.100.0050.00216.92
8.0.90.0070.00017.06
8.0.80.0120.00617.12
8.0.70.0000.00716.95
8.0.60.0000.00716.86
8.0.50.0000.00817.10
8.0.30.0120.01016.98
8.0.20.0210.01317.41
8.0.10.0030.00517.12
8.0.00.0140.00617.00
7.4.330.0000.00614.84
7.4.320.0030.00316.80
7.4.300.0000.00616.72
7.4.290.0070.00016.79
7.4.280.0050.00616.75
7.4.270.0030.00316.81
7.4.260.0000.00513.43
7.4.250.0030.00516.70
7.4.240.0040.00316.74
7.4.230.0040.00416.57
7.4.220.0070.01016.87
7.4.210.0080.00716.74
7.4.200.0070.00016.81
7.4.190.0000.00716.96
7.4.160.0070.01016.56
7.4.150.0100.00717.40
7.4.140.0040.01517.86
7.4.130.0070.01316.77
7.4.120.0090.00816.67
7.4.110.0090.00916.98
7.4.100.0140.00316.74
7.4.90.0060.01216.91
7.4.80.0120.00419.37
7.4.70.0140.00716.75
7.4.60.0170.00816.51
7.4.50.0000.00916.48
7.4.40.0030.01422.27
7.4.30.0150.00316.69
7.4.00.0120.00715.18
7.3.330.0000.00613.51
7.3.320.0040.00413.47
7.3.310.0050.00216.54
7.3.300.0060.00016.51
7.3.290.0060.00916.52
7.3.280.0080.00916.60
7.3.270.0100.00717.40
7.3.260.0140.00818.24
7.3.250.0080.01016.66
7.3.240.0180.00016.70
7.3.230.0130.00316.78
7.3.210.0100.00716.59
7.3.200.0130.00619.39
7.3.190.0070.01016.78
7.3.180.0090.00616.82
7.3.170.0080.01316.49
7.3.160.0100.01316.54
7.3.120.0080.01015.15
7.3.110.0080.00815.14
7.3.100.0060.01315.07
7.3.90.0060.01214.93
7.3.80.0100.00314.96
7.3.70.0130.00314.81
7.3.60.0030.01015.05
7.3.50.0070.00714.70
7.3.40.0070.00715.06
7.3.30.0060.00314.93
7.3.20.0000.01316.75
7.3.10.0110.00716.54
7.3.00.0060.00916.62
7.2.330.0000.01716.77
7.2.320.0090.00916.80
7.2.310.0160.00716.94
7.2.300.0130.00316.73
7.2.290.0110.00616.66
7.2.250.0040.01915.31
7.2.240.0070.01315.23
7.2.230.0070.01115.18
7.2.220.0070.00715.43
7.2.210.0070.01015.43
7.2.200.0120.00314.84
7.2.190.0100.00315.36
7.2.180.0070.01015.32
7.2.170.0060.00915.29
7.1.330.0120.00315.96
7.1.320.0000.01415.84
7.1.310.0070.00716.01
7.1.300.0070.00316.05
7.1.290.0030.01016.10
7.1.280.0040.00715.86
7.1.270.0030.00615.95
7.1.260.0110.00416.08
7.1.70.0040.00717.44
7.1.60.0150.00919.40
7.1.50.0100.01717.25
7.1.00.0070.06022.55
7.0.200.0060.00316.85
7.0.140.0000.07722.01
7.0.70.0130.06721.73
7.0.60.0070.07721.87
7.0.50.0070.07022.07
7.0.40.0000.08720.05
7.0.30.0070.07720.02
7.0.20.0000.05320.04
7.0.10.0030.07320.03
7.0.00.0100.08020.07
5.6.280.0000.07720.81
5.6.220.0100.07320.68
5.6.210.0030.07020.64
5.6.200.0030.09021.02
5.6.190.0030.08721.18
5.6.180.0100.06720.96
5.6.170.0000.06021.11
5.6.160.0000.06320.99
5.6.150.0000.08021.04
5.6.140.0070.07021.04
5.6.130.0100.06021.00
5.6.120.0070.08321.13
5.6.110.0070.08021.02
5.6.100.0130.05721.02
5.6.90.0070.08721.12
5.6.80.0100.03320.47
5.6.70.0000.05020.32
5.6.60.0070.06020.54
5.6.50.0000.07020.41
5.6.40.0030.08320.44
5.6.30.0100.07720.33
5.6.20.0070.06720.40
5.6.10.0030.07320.38
5.6.00.0030.07320.36
5.5.360.0100.07720.36
5.5.350.0000.07020.46
5.5.340.0030.08320.88
5.5.330.0030.08320.92
5.5.320.0070.09320.93
5.5.310.0070.05020.93
5.5.300.0070.08320.82
5.5.290.0070.08020.90
5.5.280.0170.07320.86
5.5.270.0030.08720.79
5.5.260.0100.08020.93
5.5.250.0000.06320.73
5.5.240.0000.07320.17
5.5.230.0100.07320.03
5.5.220.0070.06020.29
5.5.210.0000.07320.31
5.5.200.0030.07720.27
5.5.190.0070.06320.19
5.5.180.0070.07720.16
5.5.160.0130.06320.24
5.5.150.0030.07720.00
5.5.140.0100.07320.23
5.5.130.0030.07720.27
5.5.120.0030.07320.24
5.5.110.0070.08020.13
5.5.100.0070.05719.99
5.5.90.0070.07719.95
5.5.80.0000.04020.18
5.5.70.0070.03720.09
5.5.60.0030.05719.97
5.5.50.0070.06720.11
5.5.40.0070.07719.96
5.5.30.0030.06720.05
5.5.20.0070.08019.95
5.5.10.0030.07019.98
5.5.00.0030.08320.08
5.4.450.0100.07319.20
5.4.440.0030.08719.42
5.4.430.0030.08319.44
5.4.420.0030.07319.19
5.4.410.0030.08019.29
5.4.400.0070.05319.16
5.4.390.0070.04719.16
5.4.380.0070.05019.04
5.4.370.0070.06319.21
5.4.360.0000.08318.85
5.4.350.0070.06718.84
5.4.340.0070.07719.03
5.4.320.0070.06319.21
5.4.310.0030.07318.89
5.4.300.0070.07318.88
5.4.290.0000.08019.20
5.4.280.0100.07318.95
5.4.270.0070.07019.13
5.4.260.0000.06719.03
5.4.250.0070.04719.03
5.4.240.0070.07319.03
5.4.230.0000.05019.12
5.4.220.0100.06018.87
5.4.210.0000.07319.03
5.4.200.0000.07718.86
5.4.190.0100.06019.22
5.4.180.0070.07318.85
5.4.170.0000.07719.11
5.4.160.0000.07319.10
5.4.150.0000.08319.23
5.4.140.0030.07316.17
5.4.130.0000.06716.32
5.4.120.0070.07016.18
5.4.110.0070.06316.35
5.4.100.0100.07016.34
5.4.90.0070.06316.51
5.4.80.0030.07716.26
5.4.70.0000.06316.37
5.4.60.0000.06316.38
5.4.50.0000.03716.24
5.4.40.0000.03716.45
5.4.30.0000.03716.33
5.4.20.0070.03016.32
5.4.10.0070.03016.43
5.4.00.0000.03315.94
5.3.290.0000.07714.66
5.3.280.0030.05014.71
5.3.270.0000.06314.67
5.3.260.0000.07714.59
5.3.250.0030.07314.70
5.3.240.0070.07714.70
5.3.230.0100.06314.72
5.3.220.0070.07014.71
5.3.210.0030.07314.58
5.3.200.0000.06714.71
5.3.190.0100.06714.50
5.3.180.0030.07314.68
5.3.170.0030.06014.50
5.3.160.0000.04014.59
5.3.150.0030.03714.70
5.3.140.0000.04014.70
5.3.130.0070.03014.65
5.3.120.0070.03014.57
5.3.110.0000.03714.61
5.3.100.0000.03713.97
5.3.90.0000.03014.03
5.3.80.0030.03314.09
5.3.70.0000.03714.12
5.3.60.0030.02714.07
5.3.50.0000.03013.96
5.3.40.0000.03013.88
5.3.30.0000.03714.03
5.3.20.0030.06713.63
5.3.10.0000.04013.67
5.3.00.0070.04013.65
5.2.170.0030.02011.18
5.2.160.0030.02011.05
5.2.150.0000.02311.18
5.2.140.0000.04711.16
5.2.130.0030.03311.20
5.2.120.0000.03711.13
5.2.110.0000.03311.17
5.2.100.0000.03011.12
5.2.90.0000.02311.17
5.2.80.0030.02711.11
5.2.70.0000.03011.11
5.2.60.0000.03011.13
5.2.50.0000.03711.04
5.2.40.0000.03311.04
5.2.30.0000.03311.04
5.2.20.0000.02711.08
5.2.10.0000.02711.04
5.2.00.0000.02311.04
5.1.60.0000.02011.04
5.1.50.0000.02011.04
5.1.40.0030.02311.04
5.1.30.0000.02011.04
5.1.20.0000.02011.04
5.1.10.0000.02311.04
5.1.00.0000.02011.04
5.0.50.0000.01711.04
5.0.40.0000.01711.04
5.0.30.0000.02311.04
5.0.20.0000.01711.04
5.0.10.0000.02011.04
5.0.00.0030.02311.04
4.4.90.0070.00711.04
4.4.80.0000.01011.04
4.4.70.0000.01711.04
4.4.60.0000.01311.04
4.4.50.0000.01311.04
4.4.40.0000.02011.04
4.4.30.0000.02011.04
4.4.20.0030.01011.04
4.4.10.0070.00711.04
4.4.00.0000.02011.04
4.3.110.0000.01311.04
4.3.100.0030.01011.04
4.3.90.0000.01311.04
4.3.80.0000.02011.04
4.3.70.0000.01011.04
4.3.60.0000.01011.04
4.3.50.0000.01311.04
4.3.40.0000.02011.04
4.3.30.0000.01311.04
4.3.20.0000.01311.04
4.3.10.0000.01311.04
4.3.00.0000.01311.04

preferences:
41.54 ms | 401 KiB | 5 Q