3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo implements ArrayAccess { private $container = array(); public function __construct() { $this->container = array(); } public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } public function offsetExists($offset) { return isset($this->container[$offset]); } public function offsetUnset($offset) { unset($this->container[$offset]); } public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } } $foo = new foo(); $foo['bar'] = 1; var_dump(array_key_exists('bar', $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.4.10.0160.00019.54
8.3.140.0000.00820.80
8.3.130.0090.00018.39
8.3.120.0030.00619.08
8.3.110.0060.00320.94
8.3.100.0060.00316.66
8.3.90.0170.00326.77
8.3.80.0060.00318.56
8.3.70.0150.00318.68
8.3.60.0090.00617.00
8.3.50.0150.00518.29
8.3.40.0140.00418.82
8.3.30.0090.00618.66
8.3.20.0080.00018.85
8.3.10.0060.00320.48
8.3.00.0040.00419.38
8.2.260.0110.00716.73
8.2.250.0060.00318.38
8.2.240.0120.00317.20
8.2.230.0020.00522.58
8.2.220.0090.00924.06
8.2.210.0020.00526.77
8.2.200.0050.00518.54
8.2.190.0100.01318.38
8.2.180.0090.00616.48
8.2.170.0070.00722.96
8.2.160.0100.00320.18
8.2.150.0000.00924.18
8.2.140.0000.00924.66
8.2.130.0040.00426.16
8.2.120.0060.00321.12
8.2.110.0070.00320.95
8.2.100.0060.00617.84
8.2.90.0040.00420.98
8.2.80.0040.00417.93
8.2.70.0030.00517.50
8.2.60.0040.00418.16
8.2.50.0100.00018.07
8.2.40.0030.00518.16
8.2.30.0040.00418.12
8.2.20.0040.00417.89
8.2.10.0030.00517.69
8.2.00.0040.00417.69
8.1.310.0110.00716.32
8.1.300.0090.00618.55
8.1.290.0090.00018.88
8.1.280.0170.00025.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0050.00520.68
8.1.230.0070.00420.78
8.1.220.0040.00417.76
8.1.210.0000.00818.96
8.1.200.0050.00617.35
8.1.190.0050.00317.66
8.1.180.0030.00518.10
8.1.170.0040.00418.84
8.1.160.0000.00718.98
8.1.150.0000.00718.56
8.1.140.0030.00617.55
8.1.130.0080.00017.89
8.1.120.0000.01017.42
8.1.110.0040.00417.50
8.1.100.0040.00417.37
8.1.90.0000.00717.53
8.1.80.0000.00817.48
8.1.70.0000.00717.40
8.1.60.0000.00917.47
8.1.50.0000.00717.46
8.1.40.0070.00017.43
8.1.30.0000.00717.64
8.1.20.0000.00817.54
8.1.10.0060.00317.46
8.1.00.0000.00817.41
8.0.300.0050.00519.80
8.0.290.0070.00016.88
8.0.280.0070.00018.52
8.0.270.0000.00716.89
8.0.260.0030.00316.88
8.0.250.0040.00416.91
8.0.240.0070.00017.02
8.0.230.0070.00016.96
8.0.220.0000.00716.93
8.0.210.0000.00816.97
8.0.200.0000.00717.00
8.0.190.0080.00017.04
8.0.180.0000.00716.88
8.0.170.0000.00816.93
8.0.160.0040.00416.95
8.0.150.0000.00916.90
8.0.140.0000.00716.90
8.0.130.0000.00613.38
8.0.120.0080.00016.96
8.0.110.0050.00216.92
8.0.100.0050.00216.76
8.0.90.0040.00416.93
8.0.80.0060.01316.95
8.0.70.0050.00216.96
8.0.60.0040.00416.97
8.0.50.0000.00816.83
8.0.30.0040.01517.05
8.0.20.0110.00917.27
8.0.10.0000.00816.86
8.0.00.0120.00616.73
7.4.330.0000.00512.99
7.4.320.0030.00316.50
7.4.300.0060.00016.50
7.4.290.0000.00716.50
7.4.280.0030.00616.43
7.4.270.0060.00616.50
7.4.260.0060.00013.39
7.4.250.0030.00616.62
7.4.240.0030.00316.49
7.4.230.0030.00316.67
7.4.220.0110.00716.55
7.4.210.0070.00816.59
7.4.200.0070.00016.62
7.4.190.0040.00416.78
7.4.160.0160.00016.54
7.4.150.0120.00616.78
7.4.140.0090.00916.58
7.4.130.0090.00916.45
7.4.120.0130.00516.56
7.4.110.0060.01216.56
7.4.100.0160.00316.61
7.4.90.0060.01416.46
7.4.80.0110.00716.54
7.4.70.0070.01016.73
7.4.60.0130.01016.59
7.4.50.0000.00816.25
7.4.40.0070.01016.41
7.4.30.0030.01316.56
7.4.00.0110.00614.89
7.3.330.0040.00413.23
7.3.320.0070.00013.35
7.3.310.0080.00016.40
7.3.300.0030.00316.24
7.3.290.0060.00916.42
7.3.280.0110.01016.34
7.3.270.0030.01316.43
7.3.260.0150.00816.60
7.3.250.0040.01316.62
7.3.240.0070.01016.44
7.3.230.0130.00316.39
7.3.210.0080.00916.44
7.3.200.0100.00619.39
7.3.190.0110.01116.33
7.3.180.0070.01016.53
7.3.170.0100.01316.62
7.3.160.0060.01216.63
7.3.120.0060.01115.03
7.3.110.0110.00714.93
7.3.100.0070.00715.00
7.3.90.0030.00614.89
7.3.80.0080.00014.59
7.3.70.0000.01415.04
7.3.60.0030.01014.80
7.3.50.0120.00614.68
7.3.40.0040.00814.90
7.3.30.0070.00714.84
7.3.20.0000.00816.73
7.3.10.0060.00616.72
7.3.00.0040.00716.60
7.2.330.0070.01116.65
7.2.320.0130.00416.61
7.2.310.0170.00616.69
7.2.300.0080.00816.84
7.2.290.0070.01016.57
7.2.250.0160.00314.97
7.2.240.0030.01714.99
7.2.230.0000.01414.87
7.2.220.0060.00315.19
7.2.210.0060.00615.15
7.2.200.0110.00714.79
7.2.190.0090.00915.26
7.2.180.0110.00715.20
7.2.170.0030.01014.92
7.2.130.0040.01117.04
7.2.120.0030.01216.96
7.2.110.0000.01516.91
7.2.100.0090.00616.87
7.2.90.0080.00417.12
7.2.80.0030.00917.02
7.2.70.0080.00816.91
7.2.60.0060.00916.86
7.2.50.0070.00216.98
7.2.40.0130.00317.01
7.2.30.0000.01916.54
7.2.20.0080.01216.61
7.2.10.0070.01017.06
7.2.00.0030.01018.07
7.1.330.0080.00815.94
7.1.320.0060.00315.88
7.1.310.0060.00315.89
7.1.300.0110.00615.66
7.1.290.0070.00315.96
7.1.280.0060.01015.59
7.1.270.0130.00315.77
7.1.260.0000.01215.88
7.1.250.0030.01215.84
7.1.200.0130.00015.65
7.1.100.0070.00718.00
7.1.70.0030.00517.14
7.1.60.0110.01419.40
7.1.50.0040.00816.79
7.1.00.0030.04722.29
7.0.200.0170.00314.72
7.0.140.0030.07322.19
7.0.120.0030.06321.96
7.0.110.0070.06719.92
7.0.100.0130.07720.01
7.0.90.0100.04719.98
7.0.80.0070.08019.85
7.0.70.0100.08319.92
7.0.60.0100.04319.88
7.0.50.0070.07719.90
7.0.40.0100.07719.75
7.0.30.0030.08319.79
7.0.20.0100.07719.65
7.0.10.0070.08019.65
7.0.00.0170.07319.79
5.6.280.0000.07721.13
5.6.260.0070.05720.68
5.6.250.0070.08320.70
5.6.240.0070.07720.69
5.6.230.0000.09720.56
5.6.220.0030.08720.71
5.6.210.0170.06720.64
5.6.200.0130.04320.86
5.6.190.0070.08320.66
5.6.180.0100.07720.84
5.6.170.0070.08320.53
5.6.160.0200.06320.67
5.6.150.0100.08020.66
5.6.140.0100.07320.60
5.6.130.0000.08320.65
5.6.120.0000.08320.62
5.6.110.0100.06720.82
5.6.100.0030.06720.55
5.6.90.0170.07720.84
5.6.80.0030.07320.07
5.6.70.0030.04320.09
5.6.60.0130.07320.02
5.6.50.0030.08320.10
5.6.40.0100.04020.06
5.6.30.0130.07019.99
5.6.20.0200.07020.06
5.6.10.0000.08019.86
5.6.00.0100.08019.94
5.5.380.0130.07020.37
5.5.370.0100.07720.48
5.5.360.0200.06720.54
5.5.350.0030.08720.44
5.5.340.0170.07320.82
5.5.330.0030.08320.88
5.5.320.0100.04320.91
5.5.310.0070.03720.73
5.5.300.0100.07320.85
5.5.290.0170.07720.92
5.5.280.0130.08020.75
5.5.270.0170.06320.81
5.5.260.0100.08020.90
5.5.250.0130.07320.77
5.5.240.0100.04320.35
5.5.230.0100.08320.08
5.5.220.0130.07320.29
5.5.210.0070.07320.28
5.5.200.0000.08320.11
5.5.190.0170.05720.17
5.5.180.0000.08720.10
5.5.160.0070.08020.31
5.5.150.0100.07020.31
5.5.140.0030.05020.26
5.5.130.0100.07020.32
5.5.120.0030.08020.24
5.5.110.0130.06720.13
5.5.100.0070.07720.27
5.5.90.0070.07320.16
5.5.80.0100.07320.23
5.5.70.0100.08020.14
5.5.60.0030.06720.11
5.5.50.0130.06720.16
5.5.40.0030.07320.11
5.5.30.0100.07320.05
5.5.20.0100.07320.20
5.5.10.0070.07720.24
5.5.00.0030.07720.00
5.4.450.0070.08719.32
5.4.440.0000.09019.32
5.4.430.0100.07719.33
5.4.420.0070.04719.46
5.4.410.0100.08019.57
5.4.400.0030.07018.95
5.4.390.0000.08019.34
5.4.380.0070.05719.14
5.4.370.0100.04018.95
5.4.360.0030.07319.23
5.4.350.0070.06319.05
5.4.340.0030.08319.00
5.4.320.0030.05019.16
5.4.310.0100.04019.35
5.4.300.0100.07719.23
5.4.290.0070.06019.33
5.4.280.0030.05019.02
5.4.270.0030.08018.98
5.4.260.0070.08019.23
5.4.250.0000.05019.00
5.4.240.0030.08019.16
5.4.230.0030.07319.33
5.4.220.0100.07318.97
5.4.210.0070.06718.94
5.4.200.0030.08019.30
5.4.190.0030.07719.34
5.4.180.0000.08719.34
5.4.170.0000.05719.13
5.4.160.0070.07318.93
5.4.150.0130.07319.15
5.4.140.0100.07016.63
5.4.130.0130.07316.39
5.4.120.0030.07316.29
5.4.110.0130.06716.52
5.4.100.0070.07016.52
5.4.90.0070.07016.42
5.4.80.0030.07316.53
5.4.70.0100.07016.43
5.4.60.0030.06716.49
5.4.50.0030.04316.59
5.4.40.0030.06316.34
5.4.30.0200.06316.39
5.4.20.0030.07716.44
5.4.10.0000.04716.39
5.4.00.0070.04015.85
5.3.290.0070.06714.65
5.3.280.0100.04014.69
5.3.270.0070.07714.70
5.3.260.0130.07014.74
5.3.250.0070.07314.63
5.3.240.0130.07014.61
5.3.230.0070.08014.70
5.3.220.0070.08014.67
5.3.210.0130.03714.59
5.3.200.0000.08314.57
5.3.190.0170.06314.70
5.3.180.0070.07014.68
5.3.170.0070.07714.56
5.3.160.0100.07014.59
5.3.150.0070.07014.70
5.3.140.0130.06714.71
5.3.130.0070.07314.68
5.3.120.0030.06314.41
5.3.110.0030.06314.56
5.3.100.0130.06714.06
5.3.90.0030.07714.16
5.3.80.0230.05314.02
5.3.70.0070.07014.16
5.3.60.0070.06014.14
5.3.50.0130.06713.81
5.3.40.0030.03713.91
5.3.30.0030.04013.90
5.3.20.0070.03313.83
5.3.10.0170.06713.75
5.3.00.0100.06713.66
5.2.170.0070.06311.79
5.2.160.0070.06011.79
5.2.150.0000.03311.79
5.2.140.0000.03311.79
5.2.130.0070.05711.79
5.2.120.0070.05311.79
5.2.110.0130.05311.79
5.2.100.0070.05311.79
5.2.90.0070.06011.79
5.2.80.0100.04711.79
5.2.70.0030.05711.79
5.2.60.0100.04711.79
5.2.50.0030.03711.79
5.2.40.0070.05711.79
5.2.30.0030.06311.79
5.2.20.0070.06011.79
5.2.10.0070.05311.79
5.2.00.0070.05711.79
5.1.60.0030.04311.79
5.1.50.0030.05311.79
5.1.40.0030.04011.79
5.1.30.0130.02311.79
5.1.20.0030.05711.79
5.1.10.0100.04311.79
5.1.00.0030.05311.79
5.0.50.0070.04311.79
5.0.40.0030.05011.79
5.0.30.0000.06711.79
5.0.20.0030.04011.79
5.0.10.0000.04011.79
5.0.00.0000.06311.79
4.4.90.0030.03711.79
4.4.80.0000.02711.79
4.4.70.0030.01711.79
4.4.60.0070.03011.79
4.4.50.0030.03311.79
4.4.40.0070.05011.79
4.4.30.0000.04011.79
4.4.20.0030.01711.79
4.4.10.0000.02011.79
4.4.00.0030.03711.79
4.3.110.0000.04011.79
4.3.100.0070.03011.79
4.3.90.0000.01711.79
4.3.80.0030.05311.79
4.3.70.0000.02711.79
4.3.60.0070.03011.79
4.3.50.0000.03311.79
4.3.40.0100.04311.79
4.3.30.0030.03311.79
4.3.20.0000.03311.79
4.3.10.0070.03011.79
4.3.00.0070.03011.79

preferences:
29.77 ms | 403 KiB | 5 Q