3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $foo = 10; protected $bar = 12; private $meh = 14; /** * @param string $key * @return boolean */ public function offsetExists($key) { return isset($this->{$key}); } /** * @param string $key * @return boolean */ public function offsetGet($key) { return method_exists($this, 'get'. ucfirst($key)) ? $this->{'get'. ucfirst($key)} : $this->{$key}; } /** * @param string $key * @param mixed $value */ public function offsetSet($key, $value) { method_exists($this, 'set'. ucfirst($key)) ? $this->{'set'. ucfirst($key)}($value) : $this->{$key} = $value; } /** * @param string $key */ public function offsetUnset($key) { unset($this->{$key}); } } $test = new Test; var_dump(get_object_vars($test)); foreach($test as $param) { echo $param; }

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.0140.00018.31
8.3.50.0100.01021.01
8.3.40.0040.01118.75
8.3.30.0140.00719.02
8.3.20.0040.00420.30
8.3.10.0060.00323.53
8.3.00.0080.00019.13
8.2.180.0080.01116.63
8.2.170.0100.00722.96
8.2.160.0140.00620.47
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00422.24
8.2.110.0090.00020.54
8.2.100.0070.00418.03
8.2.90.0040.00419.23
8.2.80.0060.00317.97
8.2.70.0050.00317.63
8.2.60.0050.00317.80
8.2.50.0050.00318.07
8.2.40.0090.00019.94
8.2.30.0030.00618.07
8.2.20.0060.00317.75
8.2.10.0040.00417.95
8.2.00.0000.00917.72
8.1.280.0110.00925.92
8.1.270.0030.00621.95
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.66
8.1.230.0070.00217.83
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0050.00317.23
8.1.180.0090.00018.10
8.1.170.0040.00418.66
8.1.160.0030.00522.01
8.1.150.0030.00518.90
8.1.140.0000.00717.46
8.1.130.0070.00017.84
8.1.120.0000.00717.44
8.1.110.0000.00717.46
8.1.100.0030.00517.52
8.1.90.0000.00717.51
8.1.80.0080.00017.43
8.1.70.0030.00317.43
8.1.60.0000.00817.66
8.1.50.0080.00017.57
8.1.40.0050.00317.53
8.1.30.0040.00417.66
8.1.20.0030.00517.58
8.1.10.0040.00417.46
8.1.00.0000.00717.57
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0030.00318.46
8.0.270.0030.00317.27
8.0.260.0000.00617.18
8.0.250.0030.00317.02
8.0.240.0000.00816.96
8.0.230.0040.00416.92
8.0.220.0030.00716.97
8.0.210.0030.00316.95
8.0.200.0000.00817.00
8.0.190.0090.00017.00
8.0.180.0070.00016.89
8.0.170.0050.00316.79
8.0.160.0040.00416.92
8.0.150.0070.00016.96
8.0.140.0000.00716.87
8.0.130.0060.00013.26
8.0.120.0000.00816.77
8.0.110.0050.00316.94
8.0.100.0000.00716.89
8.0.90.0050.00316.90
8.0.80.0060.00916.89
8.0.70.0050.00216.86
8.0.60.0040.00416.81
8.0.50.0000.00816.89
8.0.30.0100.00916.99
8.0.20.0140.00717.40
8.0.10.0040.00416.92
8.0.00.0130.00616.77
7.4.330.0050.00015.00
7.4.320.0070.00016.52
7.4.300.0030.00316.42
7.4.290.0000.00816.60
7.4.280.0030.00516.52
7.4.270.0040.00416.55
7.4.260.0070.00416.56
7.4.250.0050.00216.57
7.4.240.0040.00316.52
7.4.230.0030.00316.52
7.4.220.0080.01216.60
7.4.210.0040.01116.56
7.4.200.0030.00316.70
7.4.160.0000.01516.69
7.4.150.0060.01217.40
7.4.140.0090.01217.86
7.4.130.0160.00216.49
7.4.120.0110.00616.43
7.4.110.0170.00616.61
7.4.100.0140.00316.65
7.4.90.0160.00316.32
7.4.80.0080.01119.39
7.4.70.0070.01016.39
7.4.60.0070.01116.39
7.4.50.0030.00516.08
7.4.40.0060.01216.61
7.4.30.0080.00916.59
7.4.00.0060.00914.71
7.3.330.0030.00313.19
7.3.320.0050.00013.32
7.3.310.0030.00316.22
7.3.300.0000.00716.19
7.3.290.0080.01016.30
7.3.280.0110.00716.35
7.3.270.0150.00317.40
7.3.260.0090.00916.60
7.3.250.0130.00416.52
7.3.240.0180.00016.38
7.3.230.0180.00416.39
7.3.210.0060.01516.42
7.3.200.0090.00919.39
7.3.190.0060.01116.74
7.3.180.0080.00816.65
7.3.170.0060.00916.40
7.3.160.0110.00916.47
7.3.120.0060.00914.93
7.3.110.0110.00714.98
7.3.100.0030.01214.66
7.3.90.0120.00314.94
7.3.80.0090.00614.55
7.3.70.0040.00814.89
7.3.60.0000.01714.89
7.3.50.0080.00814.84
7.3.40.0030.00914.75
7.3.30.0060.00914.52
7.3.20.0040.00716.75
7.3.10.0040.00816.38
7.3.00.0070.00316.57
7.2.330.0130.00416.84
7.2.320.0110.00616.51
7.2.310.0080.01516.78
7.2.300.0100.00716.52
7.2.290.0060.01816.86
7.2.240.0070.01015.02
7.2.230.0030.01014.95
7.2.220.0030.01015.03
7.2.210.0030.01014.96
7.2.200.0060.01015.01
7.2.190.0070.01015.14
7.2.180.0030.01315.10
7.2.170.0060.00914.94
7.2.160.0090.00615.04
7.2.150.0100.00716.87
7.2.140.0110.00716.71
7.2.130.0090.00916.96
7.2.120.0080.00816.96
7.2.110.0060.00616.79
7.2.100.0000.01416.82
7.2.90.0120.00316.96
7.2.80.0070.00416.74
7.2.70.0070.00716.81
7.2.60.0020.01216.84
7.2.50.0030.00916.86
7.2.40.0120.00316.57
7.2.30.0040.00416.77
7.2.20.0000.01117.01
7.2.10.0040.01116.67
7.2.00.0080.00818.19
7.1.330.0100.00715.94
7.1.320.0030.01415.52
7.1.310.0070.00315.66
7.1.300.0040.00715.66
7.1.290.0070.00315.92
7.1.280.0000.00915.83
7.1.270.0100.00615.91
7.1.260.0080.00615.54
7.1.250.0070.00715.48
7.1.200.0060.00915.80
7.1.100.0110.00418.20
7.1.70.0040.00417.16
7.1.60.0120.01219.11
7.1.50.0040.00716.95
7.1.00.0000.08022.30
7.0.200.0040.00416.94
7.0.140.0030.07721.92
7.0.110.0200.07019.89
7.0.100.0170.07320.13
7.0.90.0170.07720.04
7.0.80.0200.07020.06
7.0.70.0200.07019.97
7.0.60.0130.08320.06
7.0.50.0130.04720.02
7.0.40.0070.07719.88
7.0.30.0030.08019.70
7.0.20.0170.07319.74
7.0.10.0070.07719.78
7.0.00.0130.07319.71
5.6.280.0000.07720.93
5.6.260.0100.07720.66
5.6.250.0030.08320.73
5.6.240.0070.08320.61
5.6.230.0030.08020.66
5.6.220.0070.04320.64
5.6.210.0070.08720.41
5.6.200.0070.05320.67
5.6.190.0170.07320.48
5.6.180.0170.06020.65
5.6.170.0100.07720.48
5.6.160.0070.07720.64
5.6.150.0070.05020.63
5.6.140.0030.09020.62
5.6.130.0100.05020.69
5.6.120.0070.08720.47
5.6.110.0070.04020.59
5.6.100.0200.08320.60
5.6.90.0100.08020.63
5.6.80.0100.07720.04
5.6.70.0070.07020.03
5.6.60.0130.06020.06
5.6.50.0070.08720.25
5.6.40.0030.07719.92
5.6.30.0100.05719.93
5.6.20.0130.07019.99
5.6.10.0130.03719.93
5.6.00.0070.08719.98
5.5.380.0070.07320.36
5.5.370.0070.08720.58
5.5.360.0070.08320.32
5.5.350.0130.06720.42
5.5.340.0130.07720.77
5.5.330.0070.07720.98
5.5.320.0070.05720.81
5.5.310.0070.08320.82
5.5.300.0000.06020.88
5.5.290.0130.07021.04
5.5.280.0100.08320.89
5.5.270.0170.04321.03
5.5.260.0100.08020.88
5.5.250.0170.07320.86
5.5.240.0070.07320.30
5.5.230.0070.08020.20
5.5.220.0170.07320.29
5.5.210.0030.07720.27
5.5.200.0170.07020.10
5.5.190.0070.05720.33
5.5.180.0130.04320.26
5.5.160.0070.08020.30
5.5.150.0070.04320.25
5.5.140.0100.07020.14
5.5.130.0030.08020.14
5.5.120.0070.08020.09
5.5.110.0100.07720.35
5.5.100.0270.05320.07
5.5.90.0030.07320.15
5.5.80.0070.07720.26
5.5.70.0030.04719.98
5.5.60.0070.07020.11
5.5.50.0100.06320.01
5.5.40.0070.06320.14
5.5.30.0130.07320.20
5.5.20.0130.07720.24
5.5.10.0130.07320.23
5.5.00.0130.06720.24
5.4.450.0070.08319.36
5.4.440.0200.06719.46
5.4.430.0070.03719.56
5.4.420.0000.07719.55
5.4.410.0030.07319.14
5.4.400.0000.08719.04
5.4.390.0100.06719.02
5.4.380.0130.07719.02
5.4.370.0070.09019.20
5.4.360.0100.05719.03
5.4.350.0170.07019.01
5.4.340.0070.08019.18
5.4.320.0170.04719.23
5.4.310.0000.08019.02
5.4.300.0030.04319.33
5.4.290.0070.07719.00
5.4.280.0100.08318.98
5.4.270.0100.07719.00
5.4.260.0130.06719.09
5.4.250.0130.07319.02
5.4.240.0070.07319.22
5.4.230.0030.05719.22
5.4.220.0070.04719.25
5.4.210.0070.04718.95
5.4.200.0170.07019.01
5.4.190.0030.06319.08
5.4.180.0100.06719.00
5.4.170.0030.07719.23
5.4.160.0070.07319.03
5.4.150.0100.07019.31
5.4.140.0100.07316.50
5.4.130.0070.07016.53
5.4.120.0100.06716.24
5.4.110.0100.04016.33
5.4.100.0070.04016.36
5.4.90.0070.06016.33
5.4.80.0070.07016.56
5.4.70.0070.07316.54
5.4.60.0070.07016.29
5.4.50.0130.06716.52
5.4.40.0230.04316.39
5.4.30.0100.06016.62
5.4.20.0070.07316.47
5.4.10.0100.07016.55
5.4.00.0030.07315.80
5.3.290.0100.07014.91
5.3.280.0000.04714.70
5.3.270.0100.07014.58
5.3.260.0070.07714.63
5.3.250.0030.05714.84
5.3.240.0170.06714.57
5.3.230.0070.07714.84
5.3.220.0070.07314.58
5.3.210.0170.06714.72
5.3.200.0000.04714.58
5.3.190.0170.06714.66
5.3.180.0000.05014.70
5.3.170.0070.05014.53
5.3.160.0130.06714.70
5.3.150.0170.05014.60
5.3.140.0030.08314.54
5.3.130.0200.06314.55
5.3.120.0070.06714.41
5.3.110.0030.06314.57
5.3.100.0030.08014.03
5.3.90.0070.05314.01
5.3.80.0000.07714.02
5.3.70.0030.09314.04
5.3.60.0030.07714.01
5.3.50.0000.06014.06
5.3.40.0070.06713.95
5.3.30.0070.06713.90
5.3.20.0100.06713.68
5.3.10.0070.07313.66
5.3.00.0100.06713.64
5.2.170.0070.06011.63
5.2.160.0130.05311.63
5.2.150.0070.05311.63
5.2.140.0100.03011.63
5.2.130.0030.03711.63
5.2.120.0070.06011.63
5.2.110.0100.05311.63
5.2.100.0000.06311.63
5.2.90.0070.06011.63
5.2.80.0070.05711.63
5.2.70.0000.06711.63
5.2.60.0030.05711.63
5.2.50.0170.05311.63
5.2.40.0030.06011.63
5.2.30.0030.05711.63
5.2.20.0070.05711.63
5.2.10.0070.05711.63
5.2.00.0100.05011.63
5.1.60.0000.05311.63
5.1.50.0130.04711.63
5.1.40.0070.01711.63
5.1.30.0000.02711.63
5.1.20.0070.05311.63
5.1.10.0070.04711.63
5.1.00.0000.02711.63
5.0.50.0030.03311.63
5.0.40.0030.02711.63
5.0.30.0100.05311.63
5.0.20.0000.02711.63
5.0.10.0100.04011.63
5.0.00.0000.07011.63
4.4.90.0000.04711.63
4.4.80.0030.03311.63
4.4.70.0000.03311.63
4.4.60.0000.03311.63
4.4.50.0030.02711.63
4.4.40.0000.04011.63
4.4.30.0000.03711.63
4.4.20.0070.01311.63
4.4.10.0000.03711.63
4.4.00.0030.03711.63
4.3.110.0000.02011.63
4.3.100.0070.03011.63
4.3.90.0000.03011.63
4.3.80.0000.05311.63
4.3.70.0070.01311.63
4.3.60.0070.03011.63
4.3.50.0000.03711.63
4.3.40.0000.04711.63
4.3.30.0030.01711.63
4.3.20.0000.03011.63
4.3.10.0000.01711.63
4.3.00.0030.02711.63

preferences:
47.91 ms | 401 KiB | 5 Q