3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExtendedArrayAccess implements ArrayAccess { private $data = array(); function __construct(array $array = array()) { $this->data = $array; } function offsetExists($offset) { return array_key_exists($offset, $this->data); } function offsetGet($offset) { return $this->data[$offset]; } function offsetSet($offset, $value) { $this->data[$offset] = $value; } function offsetUnset($offset) { unset($this->data[$offset]); } } $array = new ExtendedArrayAccess(); $array[0] = null; assert(isset($var = $array[0]) === false); assert(empty($array[0]) === true);

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)
5.4.280.0070.03712.40
5.4.270.0090.03612.40
5.4.260.0080.04512.40
5.4.250.0080.05012.40
5.4.240.0050.05512.40
5.4.230.0100.04612.39
5.4.220.0070.04412.39
5.4.210.0050.04712.39
5.4.200.0070.04712.39
5.4.190.0060.04812.39
5.4.180.0090.03712.39
5.4.170.0070.03812.40
5.4.160.0120.03412.39
5.4.150.0110.05512.39
5.4.140.0110.05112.08
5.4.130.0150.03912.06
5.4.120.0090.04412.03
5.4.110.0070.04512.02
5.4.100.0100.04512.03
5.4.90.0080.04812.02
5.4.80.0070.04712.02
5.4.70.0050.04712.02
5.4.60.0080.04612.02
5.4.50.0130.05312.02
5.4.40.0090.04512.01
5.4.30.0080.04512.00
5.4.20.0070.04612.00
5.4.10.0080.04312.01
5.4.00.0070.04911.50
5.3.280.0080.04512.71
5.3.270.0080.04912.72
5.3.260.0090.04812.72
5.3.250.0090.04612.72
5.3.240.0100.05412.72
5.3.230.0080.04712.71
5.3.220.0080.04912.68
5.3.210.0100.04912.68
5.3.200.0060.04712.68
5.3.190.0080.04512.68
5.3.180.0080.05012.67
5.3.170.0080.04412.67
5.3.160.0070.04012.67
5.3.150.0090.03812.67
5.3.140.0070.04112.66
5.3.130.0070.04312.66
5.3.120.0110.04912.65
5.3.110.0040.04312.66
5.3.100.0080.04012.13
5.3.90.0070.03812.10
5.3.80.0060.03912.09
5.3.70.0090.04312.09
5.3.60.0100.03912.08
5.3.50.0080.04312.03
5.3.40.0120.04612.02
5.3.30.0080.04311.98
5.3.20.0100.04211.76
5.3.10.0070.03511.73
5.3.00.0060.03811.72

preferences:
137.81 ms | 1394 KiB | 7 Q