3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $myName; public function __set($key, $value) { if (property_exists($this, $key)) $this->$key = $value; return null; } public function __get($key) { return property_exists($this, $key) ? $this->$key : null; } public function __call($name, $arguments) { $matches = array(); $pattern = '/^set([A-Za-z0-9]+)/'; if (preg_match($pattern, $name, $matches)) { return $this->__set($this->getProp($matches[1]), $arguments[0]); } $pattern = '/^get([A-Za-z0-9]+)/'; if (preg_match($pattern, $name, $matches)) { return $this->__get($this->getProp($matches[1])); } } protected function getProp($matches) { return strtolower($matches[0]) . substr($matches, 1, strlen($matches)-1); } } $test = new Test; var_dump($test->getMyName()); $test->setMyName(25); var_dump($test->getMyName());

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.40.0070.00719.10
8.3.30.0110.00418.69
8.3.20.0040.00418.94
8.3.10.0000.00820.79
8.3.00.0040.00417.50
8.2.170.0110.00322.96
8.2.160.0070.00722.39
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.08
8.2.110.0030.00720.35
8.2.100.0090.00317.97
8.2.90.0030.00619.21
8.2.80.0050.00317.97
8.2.70.0000.00917.75
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00818.34
8.2.30.0030.00618.06
8.2.20.0030.00617.82
8.2.10.0060.00317.92
8.2.00.0040.00417.85
8.1.270.0050.00324.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0000.00822.02
8.1.230.0130.00017.54
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0040.00417.60
8.1.190.0100.00017.35
8.1.180.0030.00618.10
8.1.170.0040.00418.96
8.1.160.0000.00718.90
8.1.150.0040.00418.73
8.1.140.0000.00717.62
8.1.130.0030.00317.93
8.1.120.0050.00317.64
8.1.110.0070.00017.62
8.1.100.0040.00417.52
8.1.90.0000.00817.54
8.1.80.0000.00717.57
8.1.70.0030.00317.52
8.1.60.0050.00317.72
8.1.50.0000.00717.69
8.1.40.0000.00917.63
8.1.30.0000.00717.75
8.1.20.0000.00817.75
8.1.10.0040.00417.71
8.1.00.0000.00817.67
8.0.300.0000.00818.77
8.0.290.0040.00416.88
8.0.280.0050.00218.51
8.0.270.0070.00017.21
8.0.260.0070.00016.92
8.0.250.0050.00317.03
8.0.240.0030.00317.20
8.0.230.0030.00317.06
8.0.220.0070.00016.98
8.0.210.0000.00716.95
8.0.200.0030.00317.07
8.0.190.0030.00617.15
8.0.180.0000.00717.15
8.0.170.0000.00917.02
8.0.160.0040.00417.03
8.0.150.0040.00417.03
8.0.140.0000.00817.00
8.0.130.0000.00513.49
8.0.120.0040.00417.03
8.0.110.0040.00416.88
8.0.100.0000.00816.94
8.0.90.0040.00416.94
8.0.80.0110.00717.02
8.0.70.0040.00417.05
8.0.60.0000.00716.95
8.0.50.0000.00817.07
8.0.30.0080.01117.14
8.0.20.0130.01717.37
8.0.10.0030.00517.09
8.0.00.0120.00517.06
7.4.330.0050.00013.13
7.4.320.0000.00616.70
7.4.300.0040.00416.89
7.4.290.0040.00416.85
7.4.280.0060.00316.85
7.4.270.0030.00316.77
7.4.260.0040.00413.45
7.4.250.0030.00616.75
7.4.240.0080.00016.85
7.4.230.0070.00016.87
7.4.220.0070.01116.89
7.4.210.0050.01016.77
7.4.200.0070.00016.83
7.4.190.0000.00716.56
7.4.160.0030.01316.77
7.4.150.0070.01116.75
7.4.140.0130.01016.71
7.4.130.0030.01716.85
7.4.120.0120.00616.77
7.4.110.0130.00716.80
7.4.100.0060.01216.54
7.4.90.0110.00616.48
7.4.80.0070.01416.64
7.4.70.0110.00616.69
7.4.60.0070.01116.87
7.4.50.0030.00616.89
7.4.40.0070.00716.54
7.4.30.0060.01016.82
7.4.00.0090.00614.96
7.3.330.0060.00013.54
7.3.320.0000.00613.56
7.3.310.0000.00716.57
7.3.300.0030.00316.59
7.3.290.0040.01216.56
7.3.280.0050.01116.55
7.3.270.0140.00816.52
7.3.260.0170.00416.70
7.3.250.0110.01016.82
7.3.240.0140.00416.80
7.3.230.0030.01416.68
7.3.210.0110.00716.59
7.3.200.0090.00919.39
7.3.190.0090.00916.83
7.3.180.0130.00316.53
7.3.170.0080.01216.56
7.3.160.0030.01316.55
7.3.120.0060.00615.05
7.2.330.0060.01217.01
7.2.320.0030.01416.91
7.2.310.0230.00316.96
7.2.300.0110.00817.00
7.2.290.0070.01016.88
7.2.00.0030.01019.79
7.1.100.0060.00318.65
7.1.70.0000.01017.21
7.1.60.0100.00319.40
7.1.50.0070.01417.10
7.1.00.0000.05722.38
7.0.200.0900.00315.04
7.0.140.0030.07322.01
7.0.120.0070.07022.17
7.0.60.0030.04020.05
7.0.50.0000.04717.91
7.0.40.0070.04020.27
7.0.30.0270.08020.18
7.0.20.0200.04320.20
7.0.10.0270.03020.27
7.0.00.0070.03720.13
5.6.280.0030.07321.05
5.6.210.0030.06320.52
5.6.200.0070.05018.18
5.6.190.0100.07320.58
5.6.180.0300.04320.46
5.6.170.0370.07020.54
5.6.160.0000.05720.47
5.6.150.0070.08018.15
5.6.140.0100.08318.16
5.6.130.0070.08018.15
5.6.120.0100.08321.03
5.6.110.0030.05020.97
5.6.100.0130.05721.02
5.6.90.0070.07720.98
5.6.80.0170.07320.38
5.6.70.4300.04020.33
5.5.350.0370.06720.45
5.5.340.0070.04318.04
5.5.330.0070.08720.57
5.5.320.0130.04020.28
5.5.310.0230.07720.26
5.5.300.0070.07717.98
5.5.290.0130.07318.07
5.5.280.0100.03720.81
5.5.270.0130.05020.97
5.5.260.0030.08720.89
5.5.250.0000.06020.79
5.5.240.0100.07320.14
5.4.450.0000.07019.20
5.4.440.0000.05019.48
5.4.430.0130.04319.30
5.4.420.0100.07719.30
5.4.410.0000.05319.27
5.4.400.0030.06319.09
5.4.390.0070.07019.23
5.4.380.0100.07718.86
5.4.370.0130.03019.15
5.4.360.0130.06718.98
5.4.350.0170.02718.85
5.4.340.0130.06719.14
5.4.320.0200.06319.21
5.4.310.0100.04719.24
5.4.300.0100.06318.84
5.4.290.0030.04319.00
5.4.280.0230.06319.14
5.4.270.0130.03719.23
5.4.260.0130.07319.24
5.4.250.0170.06319.15
5.4.240.0170.07018.98
5.4.230.0070.06718.98
5.4.220.0030.08019.14
5.4.210.0030.08018.91
5.4.200.0000.08719.09
5.4.190.0130.07018.84
5.4.180.0030.08019.11
5.4.170.0100.03719.14
5.4.160.0030.05319.08
5.4.150.0130.05019.09
5.4.140.0130.06016.49
5.4.130.0000.05716.51
5.4.120.0170.06716.46
5.4.110.0000.07016.35
5.4.100.0170.04716.32
5.4.90.0100.07016.42
5.4.80.0170.03716.32
5.4.70.0030.06716.46
5.4.60.0100.06316.42
5.4.50.0070.07016.57
5.4.40.0070.03316.64
5.4.30.0130.02716.30
5.4.20.0030.04716.38
5.4.10.0030.07316.27
5.4.00.0070.04015.83
5.3.290.0070.04314.68
5.3.280.0100.07314.63
5.3.270.0030.05014.77
5.3.260.0070.06014.50
5.3.250.0030.07714.52
5.3.240.0170.05014.76
5.3.230.0100.05714.53
5.3.220.0130.05314.47
5.3.210.0100.07314.58
5.3.200.0070.08014.58
5.3.190.0100.05714.57
5.3.180.0000.06014.64
5.3.170.0100.04314.49
5.3.160.0000.05314.59
5.3.150.0130.03714.60
5.3.140.0070.03714.71
5.3.130.0070.03714.71
5.3.120.0030.04314.57
5.3.110.0070.07714.57
5.3.100.0000.04714.09
5.3.90.0030.03714.03
5.3.80.0130.06714.18
5.3.70.0130.05314.03
5.3.60.0070.07314.05
5.3.50.0000.05313.99
5.3.40.0070.07014.04
5.3.30.0100.07013.89
5.3.20.0170.06713.67
5.3.10.0100.06013.72
5.3.00.0030.06313.66
5.2.170.0030.05711.11
5.2.160.0030.04011.18
5.2.150.0000.03311.20
5.2.140.0100.05711.05
5.2.130.0100.05011.20
5.2.120.0100.06011.18
5.2.110.0070.05311.11
5.2.100.0070.06011.08
5.2.90.0070.06011.15
5.2.80.0070.06311.03
5.2.70.0030.04311.16
5.2.60.0130.05311.01
5.2.50.0000.04010.92
5.2.40.0030.03311.05
5.2.30.0130.02310.96
5.2.20.0000.06710.99
5.2.10.0030.05710.92
5.2.00.0030.05310.79
5.1.60.0070.0339.98
5.1.50.0000.0579.91
5.1.40.0000.04710.04
5.1.30.0070.03010.40
5.1.20.0030.06010.32
5.1.10.0000.03010.10
5.1.00.0070.05010.14
5.0.50.0000.0338.47
5.0.40.0070.0178.39
5.0.30.0000.0638.21
5.0.20.0000.0308.19
5.0.10.0030.0478.34
5.0.00.0070.0638.09
4.4.90.0070.0377.87
4.4.80.0030.0207.87
4.4.70.0100.0337.87
4.4.60.0030.0177.87
4.4.50.0030.0337.87
4.4.40.0070.0207.87
4.4.30.0000.0237.87
4.4.20.0000.0307.87
4.4.10.0100.0377.87
4.4.00.0030.0377.87
4.3.110.0000.0177.87
4.3.100.0030.0177.87
4.3.90.0100.0277.87
4.3.80.0000.0577.87
4.3.70.0030.0277.87
4.3.60.0030.0237.87
4.3.50.0000.0377.87
4.3.40.0030.0537.87
4.3.30.0000.0337.87
4.3.20.0000.0377.87
4.3.10.0030.0337.87
4.3.00.0070.0337.87

preferences:
40.8 ms | 400 KiB | 5 Q