3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ArrayObjectChild extends ArrayObject { public function offsetExists($offset) { var_dump('Called: '.__METHOD__); return parent::offsetExists($offset); } public function offsetGet($offset) { var_dump('Called: '.__METHOD__); return parent::offsetGet($offset); } } class ArrayAcessImplementation implements ArrayAccess { private $_array = array(); public function __construct(array $array) { $this->_array = $array; } public function offsetExists($offset) { var_dump('Called: '.__METHOD__); return array_key_exists($offset, $this->_array); } public function offsetGet($offset) { var_dump('Called: '.__METHOD__); return $this->_array($offset); } public function offsetSet($offset, $value) {} public function offsetUnset($offset) {} } $array = array('foo' => ''); // ArrayObject: empty string is set, but empty $object = new ArrayObject($array); var_dump(isset($object['foo']), empty($object['foo'])); // ArrayObject extended: empty string is set, but not empty $object = new ArrayObjectChild($array); var_dump(isset($object['foo']), empty($object['foo'])); // ArrayAccess implemented: empty string is set, but empty $object = new ArrayAcessImplementation($array); var_dump(isset($object['foo']), empty($object['foo']));

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.0100.01018.97
8.3.30.0040.01118.84
8.3.20.0090.00018.95
8.3.10.0040.00420.61
8.3.00.0030.00619.38
8.2.170.0090.00622.96
8.2.160.0060.00921.20
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0030.00626.16
8.2.120.0080.00020.88
8.2.110.0040.00721.12
8.2.100.0040.00817.84
8.2.90.0000.00819.47
8.2.80.0000.00919.31
8.2.70.0060.00317.63
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0040.00417.92
8.2.30.0070.00018.14
8.2.20.0000.00717.81
8.2.10.0080.00017.81
8.2.00.0000.00817.76
8.1.270.0140.00424.66
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.89
8.1.230.0000.01121.03
8.1.220.0030.00517.74
8.1.210.0050.00318.88
8.1.200.0090.00017.38
8.1.190.0040.00417.51
8.1.180.0030.00518.10
8.1.170.0040.00418.80
8.1.160.0000.00818.91
8.1.150.0050.00318.57
8.1.140.0040.00417.43
8.1.130.0050.00317.84
8.1.120.0040.00417.46
8.1.110.0000.00817.38
8.1.100.0040.00417.45
8.1.90.0040.00417.54
8.1.80.0000.00717.38
8.1.70.0040.00417.33
8.1.60.0000.00817.50
8.1.50.0080.00017.49
8.1.40.0040.00417.58
8.1.30.0040.00417.56
8.1.20.0050.00317.65
8.1.10.0000.00817.59
8.1.00.0040.00417.41
8.0.300.0040.00419.89
8.0.290.0040.00416.63
8.0.280.0040.00418.52
8.0.270.0030.00317.24
8.0.260.0040.00416.78
8.0.250.0000.00816.98
8.0.240.0030.00316.92
8.0.230.0030.00317.06
8.0.220.0030.00316.95
8.0.210.0030.00516.93
8.0.200.0050.00517.03
8.0.190.0040.00416.95
8.0.180.0050.00316.88
8.0.170.0030.00616.95
8.0.160.0000.00716.87
8.0.150.0000.00916.90
8.0.140.0060.00316.83
8.0.130.0040.00413.42
8.0.120.0000.00817.03
8.0.110.0000.00717.09
8.0.100.0070.00017.03
8.0.90.0000.00816.88
8.0.80.0040.01117.02
8.0.70.0070.00016.79
8.0.60.0000.00716.87
8.0.50.0000.00716.97
8.0.30.0100.01117.19
8.0.20.0080.01117.02
8.0.10.0030.00517.07
8.0.00.0100.01016.85
7.4.330.0030.00313.01
7.4.320.0090.00016.54
7.4.300.0030.00316.38
7.4.290.0030.00316.46
7.4.280.0030.00616.66
7.4.270.0000.00716.55
7.4.260.0060.00013.24
7.4.250.0070.00316.49
7.4.240.0000.00716.55
7.4.230.0030.00316.74
7.4.220.0090.00916.45
7.4.210.0090.00516.54
7.4.200.0030.00316.63
7.4.190.0080.00016.69
7.4.160.0100.00716.45
7.4.150.0150.00616.66
7.4.140.0110.01116.60
7.4.130.0060.01116.65
7.4.120.0120.00816.48
7.4.110.0160.00716.45
7.4.100.0070.01116.59
7.4.90.0040.01416.71
7.4.80.0130.00919.39
7.4.70.0080.00816.64
7.4.60.0170.00316.41
7.4.50.0040.00916.49
7.4.40.0110.00016.55
7.4.30.0130.00316.52
7.4.00.0090.00815.10
7.3.330.0030.00313.41
7.3.320.0030.00513.19
7.3.310.0000.00716.30
7.3.300.0070.00016.41
7.3.290.0120.00916.52
7.3.280.0120.00716.39
7.3.270.0140.00616.54
7.3.260.0070.01116.48
7.3.250.0080.01316.45
7.3.240.0120.00616.39
7.3.230.0060.01116.54
7.3.210.0130.00716.46
7.3.200.0070.01616.61
7.3.190.0100.00716.45
7.3.180.0000.01616.64
7.3.170.0190.00416.56
7.3.160.0110.00616.48
7.3.120.0050.01414.77
7.3.110.0070.00914.83
7.3.100.0030.00714.92
7.3.90.0100.00314.98
7.3.80.0100.00414.97
7.3.70.0070.00914.78
7.3.60.0080.00514.76
7.3.50.0080.00614.98
7.3.40.0050.01014.96
7.3.30.0050.00714.93
7.3.20.0040.00916.76
7.3.10.0090.00516.52
7.3.00.0070.00916.53
7.2.330.0110.00816.84
7.2.320.0100.00716.64
7.2.310.0160.00616.61
7.2.300.0190.00616.76
7.2.290.0130.00316.54
7.2.250.0170.00314.86
7.2.240.0070.01114.91
7.2.230.0050.01215.12
7.2.220.0080.00714.97
7.2.210.0050.01015.10
7.2.200.0060.00914.89
7.2.190.0020.01314.94
7.2.180.0050.01214.95
7.2.170.0090.00715.07
7.2.160.0100.00315.15
7.2.150.0070.00717.05
7.2.140.0000.01716.90
7.2.130.0100.00616.74
7.2.120.0060.00616.90
7.2.110.0070.00716.95
7.2.100.0040.00816.73
7.2.90.0040.01216.86
7.2.80.0050.01016.74
7.2.70.0090.00616.97
7.2.60.0070.00716.74
7.2.50.0080.00816.65
7.2.40.0060.01017.06
7.2.30.0090.00616.78
7.2.20.0080.00816.88
7.2.10.0070.00716.96
7.2.00.0030.00916.89
7.1.330.0050.01115.72
7.1.320.0080.00515.71
7.1.310.0060.00815.68
7.1.300.0100.00515.61
7.1.290.0040.01115.68
7.1.280.0070.00415.61
7.1.270.0090.00315.78
7.1.260.0070.00715.58
7.1.250.0130.00315.85
7.1.200.0140.00015.87
7.1.100.0070.00317.87
7.1.70.0000.00817.04
7.1.60.0090.01519.40
7.1.50.0060.00616.63
7.1.00.0000.04722.34
7.0.200.0040.01114.93
7.0.140.0100.06721.95
7.0.120.0030.07722.05
7.0.60.0030.09020.02
7.0.50.0130.07317.98
7.0.40.0070.05017.86
7.0.30.0100.04717.72
7.0.20.0130.08017.75
7.0.10.0130.06317.75
7.0.00.0130.04317.81
5.6.280.0030.07321.04
5.6.210.0030.04020.49
5.6.200.0000.07318.15
5.6.190.0130.06718.21
5.6.180.0030.05018.29
5.6.170.0070.07318.18
5.6.160.0100.06718.19
5.6.150.0100.08018.24
5.6.140.0100.03718.15
5.6.130.0000.04718.15
5.6.120.0100.04318.18
5.6.110.0100.05718.21
5.6.100.0000.05318.20
5.6.90.0070.08018.26
5.6.80.0030.07717.66
5.6.70.0030.04717.56
5.6.60.0000.04317.55
5.6.50.0070.04017.66
5.6.40.0070.04017.53
5.6.30.0130.07017.64
5.6.20.0030.05717.64
5.6.10.0000.09317.59
5.6.00.0070.07717.48
5.5.350.0170.03020.37
5.5.340.0130.06318.02
5.5.330.0070.07318.10
5.5.320.0000.05717.98
5.5.310.0030.04318.02
5.5.300.0130.03318.02
5.5.290.0070.08017.95
5.5.280.0030.04717.98
5.5.270.0030.07018.04
5.5.260.0100.07717.95
5.5.250.0070.08317.75
5.5.240.0030.07317.37
5.5.230.0070.07717.36
5.5.220.0000.04317.45
5.5.210.0000.04317.48
5.5.200.0070.04317.34
5.5.190.0170.07017.29
5.5.180.0030.08017.34
5.5.160.0030.08717.40
5.5.150.0070.05017.28
5.5.140.0030.08017.33
5.5.130.0100.07017.36
5.5.120.0030.07017.32
5.5.110.0000.08717.32
5.5.100.0070.06317.20
5.5.90.0030.07717.23
5.5.80.0130.07317.32
5.5.70.0070.07017.29
5.5.60.0030.04317.20
5.5.50.0070.05017.22
5.5.40.0030.05317.18
5.5.30.0170.07317.21
5.5.20.0100.04717.28
5.5.10.0130.05317.21
5.5.00.0100.04317.20
5.4.450.0100.03719.42
5.4.440.0130.05719.32
5.4.430.0100.07319.45
5.4.420.0100.06319.31
5.4.410.0100.07019.46
5.4.400.0100.07019.06
5.4.390.0030.08719.03
5.4.380.0070.04719.01
5.4.370.0070.04019.09
5.4.360.0170.07018.95
5.4.350.0100.06719.04
5.4.340.0170.07019.17
5.4.320.0100.07718.89
5.4.310.0100.07018.95
5.4.300.0030.08019.01
5.4.290.0130.07319.13
5.4.280.0170.06719.11
5.4.270.0100.03318.95
5.4.260.0100.04319.05
5.4.250.0070.04019.01
5.4.240.0070.05319.09
5.4.230.0100.07319.03
5.4.220.0070.03719.09
5.4.210.0100.08018.99
5.4.200.0030.06719.05
5.4.190.0100.06019.11
5.4.180.0130.06319.02
5.4.170.0070.07019.03
5.4.160.0070.07719.04
5.4.150.0030.04019.03
5.4.140.0000.05016.42
5.4.130.0000.04016.30
5.4.120.0070.03316.41
5.4.110.0200.06716.45
5.4.100.0130.06316.45
5.4.90.0100.06716.40
5.4.80.0000.05716.57
5.4.70.0070.07016.45
5.4.60.0130.07316.36
5.4.50.0130.07016.37
5.4.40.0100.05316.53
5.4.30.0030.04316.44
5.4.20.0130.05016.55
5.4.10.0130.04016.42
5.4.00.0070.04315.80
5.3.290.0100.06314.54
5.3.280.0030.04314.65
5.3.270.0100.07314.70
5.3.260.0070.04714.73
5.3.250.0100.03014.69
5.3.240.0070.03714.63
5.3.230.0070.03714.62
5.3.220.0030.03714.66
5.3.210.0100.07314.64
5.3.200.0100.07014.61
5.3.190.0130.07014.70
5.3.180.0100.05714.61
5.3.170.0070.07714.63
5.3.160.0070.07014.54
5.3.150.0100.07014.43
5.3.140.0070.06314.63
5.3.130.0070.04314.62
5.3.120.0100.07314.59
5.3.110.0000.06014.63
5.3.100.0030.06314.08
5.3.90.0070.04714.09
5.3.80.0000.05314.06
5.3.70.0030.07714.03
5.3.60.0030.06714.05
5.3.50.0070.05314.06
5.3.40.0100.06713.99
5.3.30.0070.04313.99
5.3.20.0000.05713.93
5.3.10.0100.05013.70
5.3.00.0070.05013.64
5.2.170.0030.03711.24
5.2.160.0030.04011.16
5.2.150.0030.06011.17
5.2.140.0000.03311.01
5.2.130.0070.05011.18
5.2.120.0000.03711.16
5.2.110.0070.06011.23
5.2.100.0030.04011.20
5.2.90.0000.03711.16
5.2.80.0100.03011.11
5.2.70.0100.04711.02
5.2.60.0030.05311.29
5.2.50.0070.04311.05
5.2.40.0000.05011.04
5.2.30.0030.05311.04
5.2.20.0030.03710.93
5.2.10.0100.03010.93
5.2.00.0000.03710.70
5.1.60.0030.02310.07
5.1.50.0070.05010.05
5.1.40.0100.0379.99
5.1.30.0070.05310.30
5.1.20.0030.06010.48
5.1.10.0070.04010.16
5.1.00.0030.04710.09
5.0.50.0000.0508.47
5.0.40.0070.0408.50
5.0.30.0000.0708.21
5.0.20.0100.0378.25
5.0.10.0030.0308.27
5.0.00.0070.0538.08
4.4.90.0070.0337.83
4.4.80.0000.0307.83
4.4.70.0030.0377.83
4.4.60.0070.0307.83
4.4.50.0030.0237.83
4.4.40.0070.0207.83
4.4.30.0100.0177.83
4.4.20.0070.0307.83
4.4.10.0000.0307.83
4.4.00.0100.0507.83
4.3.110.0000.0377.83
4.3.100.0030.0377.83
4.3.90.0030.0377.83
4.3.80.0000.0507.83
4.3.70.0030.0277.83
4.3.60.0000.0207.83
4.3.50.0070.0307.83
4.3.40.0070.0477.83
4.3.30.0030.0177.83
4.3.20.0000.0407.83
4.3.10.0000.0407.83
4.3.00.0070.0237.83

preferences:
60.35 ms | 400 KiB | 5 Q