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.0070.00718.97
8.3.30.0140.00719.13
8.3.20.0040.00420.21
8.3.10.0000.00722.09
8.3.00.0040.00422.52
8.2.170.0100.00722.96
8.2.160.0030.01019.20
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.77
8.2.110.0040.00422.11
8.2.100.0080.00418.09
8.2.90.0000.00719.35
8.2.80.0050.00317.97
8.2.70.0060.00317.63
8.2.60.0050.00318.05
8.2.50.0060.00318.07
8.2.40.0050.00518.00
8.2.30.0060.00318.19
8.2.20.0080.00017.66
8.2.10.0080.00017.75
8.2.00.0030.00517.82
8.1.270.0060.00318.61
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0050.00523.91
8.1.230.0070.00419.08
8.1.220.0030.00617.79
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.63
8.1.180.0000.00918.71
8.1.170.0060.00318.48
8.1.160.0000.00822.08
8.1.150.0040.00418.60
8.1.140.0050.00217.47
8.1.130.0070.00017.90
8.1.120.0070.00017.32
8.1.110.0040.00417.45
8.1.100.0050.00217.56
8.1.90.0050.00517.45
8.1.80.0070.00017.50
8.1.70.0050.00217.42
8.1.60.0060.00317.65
8.1.50.0000.00717.50
8.1.40.0000.00817.57
8.1.30.0040.00417.63
8.1.20.0000.00817.56
8.1.10.0030.00617.58
8.1.00.0000.00817.42
8.0.300.0000.00718.77
8.0.290.0000.00717.04
8.0.280.0080.00018.38
8.0.270.0040.00417.24
8.0.260.0040.00416.76
8.0.250.0070.00016.87
8.0.240.0060.00317.04
8.0.230.0000.00716.86
8.0.220.0030.00316.94
8.0.210.0020.00516.82
8.0.200.0000.00716.87
8.0.190.0070.00016.90
8.0.180.0000.00716.96
8.0.170.0030.00516.83
8.0.160.0030.00517.04
8.0.150.0080.00016.87
8.0.140.0070.00016.86
8.0.130.0030.00313.35
8.0.120.0000.00816.83
8.0.110.0040.00416.96
8.0.100.0040.00416.78
8.0.90.0000.00716.77
8.0.80.0080.00816.82
8.0.70.0040.00416.73
8.0.60.0000.00716.98
8.0.50.0000.00716.82
8.0.30.0160.00317.11
8.0.20.0110.00717.40
8.0.10.0040.00416.97
8.0.00.0140.00616.73
7.4.330.0020.00215.00
7.4.320.0000.00616.68
7.4.300.0000.00616.63
7.4.290.0050.00316.61
7.4.280.0000.00716.50
7.4.270.0000.00716.68
7.4.260.0030.00316.50
7.4.250.0040.00416.41
7.4.240.0030.00416.52
7.4.230.0030.00316.72
7.4.220.0000.01816.60
7.4.210.0060.00816.59
7.4.200.0070.00016.51
7.4.190.0030.00316.74
7.4.160.0000.02016.60
7.4.150.0090.00917.40
7.4.140.0160.00517.86
7.4.130.0050.01216.54
7.4.120.0070.01016.55
7.4.110.0030.01416.39
7.4.100.0160.00616.67
7.4.90.0100.01016.29
7.4.80.0030.01619.39
7.4.70.0090.00916.38
7.4.60.0100.00716.46
7.4.50.0040.00416.19
7.4.40.0040.01122.77
7.4.30.0080.00816.55
7.4.00.0070.01114.75
7.3.330.0050.00013.36
7.3.320.0050.00013.27
7.3.310.0030.00316.39
7.3.300.0030.00316.21
7.3.290.0140.00316.30
7.3.280.0040.01216.35
7.3.270.0070.01417.40
7.3.260.0030.01416.48
7.3.250.0140.00616.31
7.3.240.0130.00616.46
7.3.230.0160.00616.39
7.3.210.0050.01216.44
7.3.200.0160.00619.39
7.3.190.0140.00616.53
7.3.180.0130.00516.53
7.3.170.0140.00916.50
7.3.160.0060.01316.64
7.3.120.0050.01114.80
7.3.110.0020.01414.90
7.3.100.0050.01014.95
7.3.90.0030.00814.72
7.3.80.0090.00614.88
7.3.70.0050.00614.78
7.3.60.0030.01114.64
7.3.50.0070.00614.79
7.3.40.0050.00814.84
7.3.30.0020.00814.71
7.3.20.0050.01016.68
7.3.10.0040.00716.65
7.3.00.0050.00716.56
7.2.330.0070.01416.84
7.2.320.0120.01216.54
7.2.310.0110.00816.53
7.2.300.0080.00916.77
7.2.290.0120.00416.51
7.2.250.0060.01115.12
7.2.240.0050.01315.13
7.2.230.0050.00715.14
7.2.220.0070.00815.19
7.2.210.0060.00614.98
7.2.200.0080.00615.06
7.2.190.0120.00214.88
7.2.180.0050.01014.97
7.2.170.0030.01015.02
7.1.330.0000.01515.89
7.1.320.0070.01015.92
7.1.310.0060.00715.85
7.1.300.0070.00415.88
7.1.290.0110.00515.85
7.1.280.0020.01415.67
7.1.270.0080.00715.84
7.1.260.0050.00915.76
7.1.100.0070.01018.21
7.1.70.0030.00517.00
7.1.60.0150.01119.82
7.1.50.0000.02216.86
7.1.00.0070.06322.32
7.0.200.0000.00816.77
7.0.140.0130.06721.92
7.0.60.0100.04719.88
7.0.50.0000.04317.90
7.0.40.0130.08020.13
7.0.30.0300.07720.24
7.0.20.0300.06720.09
7.0.10.0130.04320.23
7.0.00.0100.04320.05
5.6.280.0000.07720.84
5.6.210.0100.08320.79
5.6.200.0070.08718.16
5.6.190.0000.08320.46
5.6.180.4100.04720.68
5.6.170.0330.06020.54
5.6.160.0100.08720.48
5.6.150.0030.08718.23
5.6.140.0100.07718.15
5.6.130.0030.08318.28
5.6.120.0070.05021.06
5.6.110.0070.04021.00
5.6.100.0030.04021.06
5.6.90.0030.08320.99
5.6.80.0000.08320.53
5.6.70.0130.07720.45
5.5.350.0230.04320.34
5.5.340.0000.06018.09
5.5.330.0100.08020.13
5.5.320.0300.07720.20
5.5.310.0330.07320.28
5.5.300.0100.07717.99
5.5.290.0000.04717.94
5.5.280.0070.05320.91
5.5.270.0200.06020.70
5.5.260.0100.06720.78
5.5.250.0100.07320.70
5.5.240.0030.04320.21
5.4.450.0570.06719.17
5.4.440.0770.05319.61
5.4.430.0730.05719.65
5.4.420.0870.06019.30
5.4.410.0670.06319.38
5.4.400.0630.04718.52
5.4.390.1500.06018.54
5.4.380.0270.04718.86
5.4.370.0270.04018.77
5.4.360.0130.05018.54
5.4.350.0130.05318.60
5.4.340.0170.05018.59
5.4.320.0080.03812.52
5.4.310.0080.04012.52
5.4.300.0060.03612.52
5.4.290.0060.03912.52
5.4.280.0100.03212.42
5.4.270.0060.03612.42
5.4.260.0050.04612.41
5.4.250.0130.07018.95
5.4.240.0130.07719.04
5.4.230.0200.05319.01
5.4.220.0230.04718.93
5.4.210.0230.06019.00
5.4.200.0230.05319.00
5.4.190.0170.06318.80
5.4.180.0130.05318.90
5.4.170.0100.05018.75
5.4.160.0030.05718.98
5.4.150.0270.06018.62
5.4.140.0130.07316.39
5.4.130.0100.05316.51
5.4.120.0100.04716.60
5.4.110.0170.05016.56
5.4.100.0100.04716.38
5.4.90.0200.03716.41
5.4.80.0000.06016.50
5.4.70.0170.06716.61
5.4.60.0130.04716.60
5.4.50.0130.04316.63
5.4.40.0130.05016.52
5.4.30.0300.05316.48
5.4.20.0170.04716.59
5.4.10.0100.05016.38
5.4.00.0130.06716.03
5.3.290.0060.03812.80
5.3.280.0230.05714.84
5.3.270.0170.04714.85
5.3.260.0100.05014.71
5.3.250.0070.05714.45
5.3.240.0070.05314.84
5.3.230.0070.05714.75
5.3.220.0130.07014.61
5.3.210.0100.06314.65
5.3.200.0030.06314.51
5.3.190.0070.06714.65
5.3.180.0170.07014.57
5.3.170.0130.07014.50
5.3.160.0070.08014.66
5.3.150.0170.07314.48
5.3.140.0230.04714.59
5.3.130.0030.06014.72
5.3.120.0100.05314.79
5.3.110.0070.05314.39
5.3.100.0070.05314.14
5.3.90.0100.05014.26
5.3.80.0100.04714.06
5.3.70.0100.05714.07
5.3.60.0100.06714.01
5.3.50.0230.05014.05
5.3.40.0030.05313.88
5.3.30.0070.05714.01
5.3.20.0070.05013.55
5.3.10.0230.03713.57
5.3.00.0130.04013.72
5.2.170.0070.04011.09
5.2.160.0200.04011.39
5.2.150.0130.03711.33
5.2.140.0170.04011.07
5.2.130.0070.04011.21
5.2.120.0030.04011.29
5.2.110.0100.04711.09
5.2.100.0200.03711.09
5.2.90.0030.04011.03
5.2.80.0100.03710.95
5.2.70.0100.03711.29
5.2.60.0100.03711.06
5.2.50.0170.03711.13
5.2.40.0030.04311.10
5.2.30.0100.03711.06
5.2.20.0100.05710.98
5.2.10.0130.03310.71
5.2.00.0070.05710.81
5.1.60.0070.03710.26
5.1.50.0130.03010.26
5.1.40.0130.03310.25
5.1.30.0070.03710.43
5.1.20.0100.04710.36
5.1.10.0100.03010.19
5.1.00.0030.03710.14
5.0.50.0030.0378.48
5.0.40.0000.0308.52
5.0.30.0070.0578.23
5.0.20.0030.0308.16
5.0.10.0000.0308.34
5.0.00.0070.0378.23
4.4.90.0030.0237.83
4.4.80.0070.0207.83
4.4.70.0000.0337.83
4.4.60.0000.0337.83
4.4.50.0000.0337.83
4.4.40.0100.0307.83
4.4.30.0030.0207.83
4.4.20.0100.0207.83
4.4.10.0030.0207.83
4.4.00.0000.0507.83
4.3.110.0000.0237.83
4.3.100.0070.0237.83
4.3.90.0070.0277.83
4.3.80.0000.0377.83
4.3.70.0000.0237.83
4.3.60.0100.0237.83
4.3.50.0000.0307.83
4.3.40.0000.0377.83
4.3.30.0070.0237.83
4.3.20.0000.0237.83
4.3.10.0000.0307.83
4.3.00.0000.0277.20

preferences:
44.32 ms | 400 KiB | 5 Q