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; 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.0040.01118.40
8.3.50.0110.00716.35
8.3.40.0110.00418.54
8.3.30.0090.00619.09
8.3.20.0040.00420.33
8.3.10.0070.00023.73
8.3.00.0080.00019.13
8.2.180.0150.00416.88
8.2.170.0140.00322.96
8.2.160.0100.00720.47
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00422.24
8.2.110.0060.00320.51
8.2.100.0060.00618.22
8.2.90.0050.00319.13
8.2.80.0030.00517.97
8.2.70.0000.00817.47
8.2.60.0040.00417.91
8.2.50.0040.00418.07
8.2.40.0050.00519.95
8.2.30.0040.00718.02
8.2.20.0090.00017.77
8.2.10.0030.00518.00
8.2.00.0020.00517.70
8.1.270.0000.00822.14
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.65
8.1.230.0080.00317.77
8.1.220.0000.00817.80
8.1.210.0030.00518.77
8.1.200.0000.00917.35
8.1.190.0060.00317.23
8.1.180.0050.00318.10
8.1.170.0030.00518.57
8.1.160.0070.00022.04
8.1.150.0070.00018.91
8.1.140.0040.00417.38
8.1.130.0000.00717.75
8.1.120.0070.00017.35
8.1.110.0000.00817.55
8.1.100.0040.00417.49
8.1.90.0000.00717.52
8.1.80.0000.00817.49
8.1.70.0030.00317.43
8.1.60.0060.00317.49
8.1.50.0030.00517.53
8.1.40.0040.00417.44
8.1.30.0040.00417.61
8.1.20.0000.00817.62
8.1.10.0050.00217.56
8.1.00.0000.00717.50
8.0.300.0000.00818.77
8.0.290.0000.00816.75
8.0.280.0040.00418.47
8.0.270.0080.00017.21
8.0.260.0040.00417.20
8.0.250.0000.00716.92
8.0.240.0070.00017.00
8.0.230.0000.00716.93
8.0.220.0040.00416.93
8.0.210.0070.00016.89
8.0.200.0070.00016.95
8.0.190.0080.00316.98
8.0.180.0000.00716.95
8.0.170.0050.00316.89
8.0.160.0040.00416.82
8.0.150.0040.00416.89
8.0.140.0000.00816.78
8.0.130.0050.00013.31
8.0.120.0000.00816.76
8.0.110.0050.00316.81
8.0.100.0030.00516.78
8.0.90.0040.00416.83
8.0.80.0030.01216.85
8.0.70.0040.00416.72
8.0.60.0060.00316.79
8.0.50.0000.00716.98
8.0.30.0100.00917.07
8.0.20.0060.01217.40
8.0.10.0040.00416.93
8.0.00.0070.00916.84
7.4.330.0000.00415.00
7.4.320.0000.00616.62
7.4.300.0000.00616.39
7.4.290.0000.00716.54
7.4.280.0040.00416.64
7.4.270.0030.00316.43
7.4.260.0070.00316.49
7.4.250.0000.00716.41
7.4.240.0030.00316.67
7.4.230.0000.00716.51
7.4.220.0060.01916.48
7.4.210.0090.00616.66
7.4.200.0080.00016.61
7.4.160.0030.01216.53
7.4.150.0150.00417.40
7.4.140.0150.00717.86
7.4.130.0080.00816.44
7.4.120.0100.00916.66
7.4.110.0130.00916.52
7.4.100.0180.00316.52
7.4.90.0120.00616.61
7.4.80.0060.01219.39
7.4.70.0110.00616.59
7.4.60.0040.00616.37
7.4.50.0000.00816.46
7.4.40.0200.00316.50
7.4.30.0130.00316.50
7.4.00.0060.01015.00
7.3.330.0050.00013.20
7.3.320.0000.00613.29
7.3.310.0030.00316.29
7.3.300.0040.00416.16
7.3.290.0070.00816.36
7.3.280.0080.01116.32
7.3.270.0170.00017.40
7.3.260.0100.01016.60
7.3.250.0090.00816.34
7.3.240.0110.00616.34
7.3.230.0100.00716.43
7.3.210.0180.00616.68
7.3.200.0060.01519.39
7.3.190.0110.00516.29
7.3.180.0080.01116.25
7.3.170.0060.01416.55
7.3.160.0030.01316.60
7.2.330.0070.01016.82
7.2.320.0140.00616.57
7.2.310.0060.01016.75
7.2.300.0120.00316.51
7.2.290.0110.01316.73
7.2.00.0000.01019.25
7.1.100.0000.01118.03
7.1.70.0030.00516.86
7.1.60.0120.00919.11
7.1.50.0060.00916.96
7.1.00.0070.07322.29
7.0.200.0000.00816.88
7.0.140.0030.07722.04
7.0.110.0100.04319.97
7.0.100.0070.05319.95
7.0.90.0100.08720.02
7.0.80.0000.05319.98
7.0.70.0030.08319.95
7.0.60.0030.08319.91
7.0.50.0030.08319.91
7.0.40.0100.07319.71
7.0.30.0000.04719.79
7.0.20.0070.05019.87
7.0.10.0000.04319.86
7.0.00.0030.04019.87
5.6.280.0030.07321.03
5.6.260.0030.05020.51
5.6.250.0100.07720.87
5.6.240.0000.08320.70
5.6.230.0000.08020.57
5.6.220.0030.07020.70
5.6.210.0070.03720.41
5.6.200.0030.04320.48
5.6.190.0200.06720.63
5.6.180.0100.08320.66
5.6.170.0030.03320.56
5.6.160.0070.04020.57
5.6.150.0070.07720.53
5.6.140.0000.06320.73
5.6.130.0070.07320.63
5.6.120.0100.05720.47
5.6.110.0100.07720.55
5.6.100.0000.09020.55
5.6.90.0100.07720.63
5.6.80.0100.06720.01
5.6.70.0100.04020.07
5.6.60.0030.07320.03
5.6.50.0130.07719.95
5.6.40.0170.04020.01
5.6.30.0070.07720.04
5.6.20.0100.08320.00
5.6.10.0100.07719.93
5.6.00.0030.05719.95
5.5.380.0070.07717.63
5.5.370.0130.07317.47
5.5.360.0100.07717.69
5.5.350.0030.07317.59
5.5.340.0000.06717.95
5.5.330.0070.08718.23
5.5.320.0070.07318.23
5.5.310.0070.07318.13
5.5.300.0070.07717.83
5.5.290.0100.07017.93
5.5.280.0000.07717.91
5.5.270.0000.07017.92
5.5.260.0070.08018.05
5.5.250.0100.07317.86
5.5.240.0070.06717.64
5.5.230.0070.07317.61
5.5.220.0200.05717.30
5.5.210.0030.05017.30
5.5.200.0130.06717.36
5.5.190.0070.04717.18
5.5.180.0100.09017.48
5.5.160.0130.05317.18
5.5.150.0030.06717.44
5.5.140.0100.04317.60
5.5.130.0070.06317.57
5.5.120.0070.06017.28
5.5.110.0170.04017.43
5.5.100.0100.03317.35
5.5.90.0100.07017.32
5.5.80.0200.06017.20
5.5.70.0030.07717.29
5.5.60.0070.07717.46
5.5.50.0100.06317.33
5.5.40.0070.04017.29
5.5.30.0070.04017.32
5.5.20.0030.07317.49
5.5.10.0100.07317.33
5.5.00.0100.07017.39
5.4.450.0030.04719.35
5.4.440.0100.07019.34
5.4.430.0130.07019.32
5.4.420.0130.06019.41
5.4.410.0030.08019.53
5.4.400.0070.08019.32
5.4.390.0100.03318.90
5.4.380.0100.03718.98
5.4.370.0170.07319.02
5.4.360.0100.07319.02
5.4.350.0100.06719.23
5.4.340.0030.07319.02
5.4.320.0130.03719.00
5.4.310.0070.04018.98
5.4.300.0130.07318.95
5.4.290.0000.08019.03
5.4.280.0000.06319.01
5.4.270.0070.03719.18
5.4.260.0030.06319.01
5.4.250.0070.08019.22
5.4.240.0170.06719.00
5.4.230.0030.07319.02
5.4.220.0130.06319.13
5.4.210.0130.04019.08
5.4.200.0070.07019.19
5.4.190.0100.07319.13
5.4.180.0070.07319.21
5.4.170.0100.05319.15
5.4.160.0130.07718.91
5.4.150.0070.05318.98
5.4.140.0030.03716.53
5.4.130.0030.04016.35
5.4.120.0000.04016.55
5.4.110.0000.04016.32
5.4.100.0100.03016.42
5.4.90.0000.03716.57
5.4.80.0030.03716.53
5.4.70.0000.03716.39
5.4.60.0070.03316.49
5.4.50.0070.03316.25
5.4.40.0070.07316.50
5.4.30.0130.06316.38
5.4.20.0070.06716.23
5.4.10.0000.04716.42
5.4.00.0030.07015.97
5.3.290.0030.08014.77
5.3.280.0030.08314.74
5.3.270.0100.07314.64
5.3.260.0200.05014.67
5.3.250.0000.04314.84
5.3.240.0130.03014.84
5.3.230.0070.05014.64
5.3.220.0000.04014.66
5.3.210.0130.03714.43
5.3.200.0000.03714.72
5.3.190.0030.03714.61
5.3.180.0030.03714.58
5.3.170.0000.04014.65
5.3.160.0070.05314.59
5.3.150.0000.03714.57
5.3.140.0070.07714.57
5.3.130.0030.03714.59
5.3.120.0000.05014.68
5.3.110.0070.03714.70
5.3.100.0030.03314.05
5.3.90.0030.03713.99
5.3.80.0070.03314.04
5.3.70.0070.04014.12
5.3.60.0000.04014.00
5.3.50.0030.04013.96
5.3.40.0000.04013.95
5.3.30.0030.03313.93
5.3.20.0030.05713.70
5.3.10.0030.03313.64
5.3.00.0000.03713.79
5.2.170.0070.03312.21
5.2.160.0100.02712.21
5.2.150.0030.04012.21
5.2.140.0100.02012.21
5.2.130.0000.03312.21
5.2.120.0030.02712.21
5.2.110.0000.03012.21
5.2.100.0000.03012.21
5.2.90.0070.02312.21
5.2.80.0000.03012.21
5.2.70.0030.03012.21
5.2.60.0000.03712.21
5.2.50.0000.03312.21
5.2.40.0070.02312.21
5.2.30.0000.03012.21
5.2.20.0030.02312.21
5.2.10.0030.03012.21
5.2.00.0030.02712.21
5.1.60.0030.02312.21
5.1.50.0070.02012.21
5.1.40.0000.03012.21
5.1.30.0000.02712.21
5.1.20.0000.02712.21
5.1.10.0000.02312.21
5.1.00.0030.02712.21
5.0.50.0000.02012.21
5.0.40.0030.01312.21
5.0.30.0030.02312.21
5.0.20.0030.01712.21
5.0.10.0000.02012.21
5.0.00.0000.03312.21
4.4.90.0000.01712.21
4.4.80.0030.01712.21
4.4.70.0000.01712.21
4.4.60.0070.01012.21
4.4.50.0000.02312.21
4.4.40.0000.02712.21
4.4.30.0000.01712.21
4.4.20.0000.03012.21
4.4.10.0030.01712.21
4.4.00.0070.02012.21
4.3.110.0000.01712.21
4.3.100.0030.01012.21
4.3.90.0000.01312.21
4.3.80.0030.02712.21
4.3.70.0000.01712.21
4.3.60.0030.01312.21
4.3.50.0000.03012.21
4.3.40.0030.02012.21
4.3.30.0030.01712.21
4.3.20.0000.01712.21
4.3.10.0070.03012.21
4.3.00.0030.02712.21

preferences:
47.17 ms | 400 KiB | 5 Q