3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); class MyArray implements ArrayAccess { public $value; public function __construct($value = null) { $this->value = $value; } public function &offsetGet($offset) { var_dump(__METHOD__); if (!isset($this->value[$offset])) { throw new Exception('Undefined index: ' . $offset); } return $this->value[$offset]; } public function offsetExists($offset) { var_dump(__METHOD__); return isset($this->value[$offset]); } public function offsetSet($offset, $value) { var_dump(__METHOD__); $this->value[$offset] = $value; } public function offsetUnset($offset) { var_dump(__METHOD__); $this->value[$offset] = null; } } $record = new MyArray([ 'foo' => [ 'bar' => 'baz' ] ]); var_dump(isset($record['foo']['bar'])); var_dump(isset($record['hello']['world']));

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.70.0130.00618.43
8.3.60.0100.00718.80
8.3.50.0080.01018.15
8.3.40.0080.00818.79
8.3.30.0120.00318.84
8.3.20.0080.00019.38
8.3.10.0000.00821.85
8.3.00.0080.00023.50
8.2.190.0000.01516.75
8.2.180.0080.00816.63
8.2.170.0070.01422.96
8.2.160.0100.00722.96
8.2.150.0050.00325.66
8.2.140.0090.00624.66
8.2.130.0000.00726.16
8.2.120.0050.00319.89
8.2.110.0000.01019.02
8.2.100.0080.00417.91
8.2.90.0070.00020.59
8.2.80.0060.00320.57
8.2.70.0030.00517.93
8.2.60.0040.00417.63
8.2.50.0080.00017.55
8.2.40.0040.00419.37
8.2.30.0000.00720.53
8.2.20.0000.00818.04
8.2.10.0040.00418.14
8.2.00.0040.00419.58
8.1.280.0120.00625.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0070.00319.27
8.1.230.0040.00820.80
8.1.220.0080.00017.74
8.1.210.0000.00819.05
8.1.200.0050.00317.35
8.1.190.0090.00017.35
8.1.180.0040.00418.10
8.1.170.0050.00318.68
8.1.160.0040.00418.90
8.1.150.0050.00218.80
8.1.140.0030.00319.08
8.1.130.0030.00319.04
8.1.120.0040.00417.46
8.1.110.0030.00617.43
8.1.100.0040.00417.52
8.1.90.0000.00917.32
8.1.80.0010.00917.46
8.1.70.0100.00017.40
8.1.60.0060.00617.50
8.1.50.0080.00317.49
8.1.40.0080.00617.47
8.1.30.0100.00617.53
8.1.20.0050.00917.63
8.1.10.0080.00517.52
8.1.00.0090.00517.50
8.0.300.0040.00420.16
8.0.290.0030.00616.75
8.0.280.0040.00418.41
8.0.270.0030.00317.22
8.0.260.0030.00317.34
8.0.250.0000.00716.96
8.0.240.0000.00716.96
8.0.230.0040.00417.05
8.0.220.0040.00416.93
8.0.210.0090.00416.88
8.0.200.0050.00516.92
8.0.190.0050.00516.94
8.0.180.0090.00316.88
8.0.170.0060.00816.85
8.0.160.0090.00716.85
8.0.150.0050.00816.82
8.0.140.0120.00216.83
8.0.130.0070.00415.70
8.0.120.0090.00516.90
8.0.110.0070.00616.81
8.0.100.0080.00416.90
8.0.90.0080.00516.84
8.0.80.0070.00916.86
8.0.70.0080.00516.81
8.0.60.0090.00516.83
8.0.50.0090.00416.81
8.0.30.0090.00817.04
8.0.20.0120.00417.06
8.0.10.0070.00517.01
8.0.00.0110.00616.86
7.4.330.0050.00015.55
7.4.320.0040.00416.53
7.4.300.0050.00516.52
7.4.290.0070.00716.52
7.4.280.0080.00516.59
7.4.270.0080.00416.50
7.4.260.0040.00916.49
7.4.250.0070.00716.43
7.4.240.0030.01116.57
7.4.230.0080.00616.44
7.4.220.0100.00316.50
7.4.210.0090.00616.47
7.4.200.0060.00616.45
7.4.190.0080.00516.54
7.4.180.0030.00716.57
7.4.160.0090.00616.58
7.4.150.0080.00716.47
7.4.140.0070.01117.39
7.4.130.0080.00716.43
7.4.120.0090.00816.52
7.4.110.0100.00516.43
7.4.100.0060.00816.47
7.4.90.0070.00716.49
7.4.80.0070.00717.44
7.4.70.0100.00316.49
7.4.60.0080.00516.35
7.4.50.0100.00516.45
7.4.40.0090.00516.31
7.4.30.0100.00016.32
7.4.20.0100.00316.41
7.4.10.0090.00216.53
7.4.00.0080.00415.89
7.3.330.0040.00615.24
7.3.320.0100.00215.25
7.3.310.0070.00516.22
7.3.300.0070.00516.15
7.3.290.0120.00016.28
7.3.280.0020.01316.32
7.3.270.0130.00116.22
7.3.260.0110.00816.41
7.3.250.0110.00416.33
7.3.240.0110.00816.36
7.3.230.0120.00416.31
7.3.220.0110.00316.29
7.3.210.0090.00616.32
7.3.200.0060.00916.34
7.3.190.0120.00616.39
7.3.180.0100.00516.30
7.3.170.0110.00616.37
7.3.160.0110.00416.27
7.3.150.0130.00216.23
7.3.140.0130.00216.26
7.3.130.0060.00916.22
7.3.120.0090.00416.21
7.3.110.0080.00616.18
7.3.100.0120.00316.19
7.3.90.0060.00816.57
7.3.80.0090.00516.25
7.3.70.0110.00416.42
7.3.60.0110.00416.41
7.3.50.0090.00616.45
7.3.40.0070.00716.39
7.3.30.0110.00216.40
7.3.20.0130.00118.19
7.3.10.0120.00218.04
7.3.00.0060.01018.11
7.2.340.0090.00616.24
7.2.330.0140.00216.41
7.2.320.0100.00616.55
7.2.310.0100.00616.53
7.2.300.0090.00716.33
7.2.290.0080.01016.37
7.2.280.0130.00116.29
7.2.270.0080.00716.35
7.2.260.0140.00116.20
7.2.250.0140.00216.20
7.2.240.0110.00516.22
7.2.230.0110.00416.36
7.2.220.0090.00716.41
7.2.210.0100.00616.29
7.2.200.0080.00916.47
7.2.190.0140.00216.50
7.2.180.0130.00216.37
7.2.170.0110.00516.54
7.2.160.0110.00416.47
7.2.150.0130.00518.41
7.2.140.0130.00318.36
7.2.130.0090.00718.48
7.2.120.0090.00818.46
7.2.110.0160.00018.49
7.2.100.0130.00318.38
7.2.90.0130.00218.42
7.2.80.0200.00517.08
7.2.70.0220.00617.27
7.2.60.0220.00117.17
7.2.50.0160.00917.27
7.2.40.0190.00317.25
7.2.30.0230.00317.31
7.2.20.0200.00517.17
7.2.10.0220.00417.24
7.2.00.0210.00517.08
7.1.330.0120.00317.26
7.1.320.0090.00617.26
7.1.310.0090.00617.42
7.1.300.0120.00217.32
7.1.290.0110.00417.33
7.1.280.0120.00217.17
7.1.270.0150.00017.21
7.1.260.0110.00317.16
7.1.250.0050.01117.27
7.1.240.0110.00517.22
7.1.230.0090.00617.32
7.1.220.0130.00217.30
7.1.210.0140.00417.33
7.1.200.0120.00316.80
7.1.190.0190.00416.17
7.1.180.0230.00316.17
7.1.170.0220.00416.15
7.1.160.0160.00616.13
7.1.150.0160.00616.14
7.1.140.0210.00316.05
7.1.130.0160.00716.07
7.1.120.0160.00616.04
7.1.110.0400.00516.07
7.1.100.0210.00616.10
7.1.90.0220.00416.12
7.1.80.0190.00616.22
7.1.70.0180.00416.01
7.1.60.0260.00522.09
7.1.50.0250.00522.08
7.1.40.0200.00822.05
7.1.30.0230.00622.12
7.1.20.0240.00722.14
7.1.10.0200.00515.99
7.1.00.0210.00616.03
7.0.330.0120.00317.02
7.0.320.0100.00417.00
7.0.310.0090.00417.07
7.0.300.0070.00717.01
7.0.290.0100.00417.00
7.0.280.0090.00516.87
7.0.270.0120.00216.95
7.0.260.0120.00317.02
7.0.250.0070.00817.10
7.0.240.0150.00017.10
7.0.230.0110.00316.98
7.0.220.0100.00517.08
7.0.210.0090.00416.96
7.0.200.0070.00717.00
7.0.190.0100.00416.87
7.0.180.0090.00516.92
7.0.170.0080.00617.06
7.0.160.0100.00416.87
7.0.150.0090.00616.95
7.0.140.0110.00416.90
7.0.130.0130.00217.00
7.0.120.0110.00416.96
7.0.110.0090.00717.12
7.0.100.0120.00216.88
7.0.90.0080.00616.89
7.0.80.0110.00316.97
7.0.70.0120.00316.91
7.0.60.0080.00717.02
7.0.50.0080.00716.99
7.0.40.0140.00017.01
7.0.30.0090.00617.16
7.0.20.0100.00516.94
7.0.10.0140.00117.06
7.0.00.0070.00716.95
5.6.400.0080.00615.90
5.6.390.0130.00116.03
5.6.380.0110.00215.87
5.6.370.0090.00515.88
5.6.360.0090.00616.05
5.6.350.0080.00715.81
5.6.340.0100.00415.96
5.6.330.0110.00216.07
5.6.320.0060.00915.88
5.6.310.0110.00315.91
5.6.300.0110.00315.86
5.6.290.0070.00716.04
5.6.280.0070.00615.90
5.6.270.0120.00215.89
5.6.260.0080.00515.91
5.6.250.0070.00715.98
5.6.240.0090.00515.88
5.6.230.0130.00016.03
5.6.220.0120.00215.95
5.6.210.0100.00415.98
5.6.200.0060.00715.84
5.6.190.0100.00416.00
5.6.180.0080.00615.92
5.6.170.0120.00215.99
5.6.160.0080.00716.00
5.6.150.0040.00915.99
5.6.140.0070.00715.97
5.6.130.0090.00415.92
5.6.120.0090.00415.90
5.6.110.0100.00315.88
5.6.100.0100.00415.81
5.6.90.0070.00715.85
5.6.80.0060.00615.97
5.6.70.0090.00515.96
5.6.60.0060.00616.02
5.6.50.0100.00315.83
5.6.40.0100.00416.01
5.6.30.0110.00215.88
5.6.20.0090.00415.87
5.6.10.0120.00215.85
5.6.00.0100.00315.83

preferences:
70.34 ms | 401 KiB | 5 Q