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' => ''); echo "ArrayObject: empty string is set, but empty:\n"; $object = new ArrayObject($array); var_dump(isset($object['foo']), empty($object['foo'])); echo "ArrayObject extended: empty string is set, but not empty\n"; $object = new ArrayObjectChild($array); var_dump($object['foo'], isset($object['foo']), empty($object['foo'])); echo "ArrayAccess implemented: empty string is set, but empty\n"; $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.60.0030.01718.39
8.3.50.0110.00821.21
8.3.40.0040.01118.79
8.3.30.0170.00319.21
8.3.20.0000.00720.35
8.3.10.0050.00322.13
8.3.00.0040.00422.40
8.2.180.0060.00916.88
8.2.170.0100.00722.96
8.2.160.0150.00018.89
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00419.66
8.2.110.0100.00622.08
8.2.100.0060.00618.22
8.2.90.0080.00019.06
8.2.80.0080.00017.97
8.2.70.0060.00317.75
8.2.60.0030.00718.04
8.2.50.0090.00318.07
8.2.40.0000.00918.22
8.2.30.0000.00718.11
8.2.20.0040.00417.77
8.2.10.0030.00617.84
8.2.00.0000.00919.51
8.1.280.0070.01125.92
8.1.270.0060.00318.56
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0050.00323.88
8.1.230.0080.00419.21
8.1.220.0000.00917.79
8.1.210.0040.00418.77
8.1.200.0050.00517.11
8.1.190.0030.00517.39
8.1.180.0050.00418.86
8.1.170.0030.00618.51
8.1.160.0050.00322.11
8.1.150.0030.00618.60
8.1.140.0050.00317.38
8.1.130.0070.00017.95
8.1.120.0030.00417.54
8.1.110.0040.00417.50
8.1.100.0070.00017.34
8.1.90.0070.00317.39
8.1.80.0040.00417.48
8.1.70.0030.00317.54
8.1.60.0000.00817.67
8.1.50.0040.00417.57
8.1.40.0060.00317.61
8.1.30.0040.00417.69
8.1.20.0000.00817.67
8.1.10.0040.00417.56
8.1.00.0000.00817.53
8.0.300.0000.00718.77
8.0.290.0000.00717.28
8.0.280.0080.00018.42
8.0.270.0000.00717.32
8.0.260.0030.00316.79
8.0.250.0000.00716.91
8.0.240.0060.00317.04
8.0.230.0040.00417.01
8.0.220.0000.00716.90
8.0.210.0070.00017.00
8.0.200.0000.00616.89
8.0.190.0080.00017.01
8.0.180.0050.00316.85
8.0.170.0040.00416.96
8.0.160.0040.00417.00
8.0.150.0000.00816.93
8.0.140.0050.00316.85
8.0.130.0000.00513.34
8.0.120.0000.00816.91
8.0.110.0040.00416.91
8.0.100.0050.00316.94
8.0.90.0050.00216.99
8.0.80.0040.01417.00
8.0.70.0040.00416.98
8.0.60.0040.00416.95
8.0.50.0000.00716.90
8.0.30.0090.01017.18
8.0.20.0150.00717.40
8.0.10.0000.00716.95
8.0.00.0090.00916.79
7.4.330.0030.00315.05
7.4.320.0040.00416.48
7.4.300.0000.00616.58
7.4.290.0080.00016.58
7.4.280.0030.00316.60
7.4.270.0030.00316.66
7.4.260.0000.00716.60
7.4.250.0030.00516.54
7.4.240.0000.00716.58
7.4.230.0030.00316.66
7.4.220.0100.01016.68
7.4.210.0090.00616.49
7.4.200.0030.00316.44
7.4.190.0070.00016.60
7.4.160.0170.00316.57
7.4.150.0120.00617.40
7.4.140.0120.00917.86
7.4.130.0100.00716.63
7.4.120.0120.00816.50
7.4.110.0000.01716.57
7.4.100.0110.00716.61
7.4.90.0140.00316.50
7.4.80.0080.01019.39
7.4.70.0070.01416.57
7.4.60.0110.00716.61
7.4.50.0040.00416.57
7.4.40.0040.01122.77
7.4.30.0040.01216.68
7.4.10.0040.01215.11
7.4.00.0050.01114.85
7.3.330.0020.00213.14
7.3.320.0020.00213.38
7.3.310.0070.00016.24
7.3.300.0030.00316.40
7.3.290.0130.01016.25
7.3.280.0080.00916.34
7.3.270.0110.00617.40
7.3.260.0090.00916.41
7.3.250.0130.00716.47
7.3.240.0080.00816.60
7.3.230.0130.00616.48
7.3.210.0030.01316.27
7.3.200.0130.01019.39
7.3.190.0150.00316.50
7.3.180.0070.01016.32
7.3.170.0150.00616.66
7.3.160.0090.00616.45
7.3.130.0120.00414.84
7.3.120.0090.00714.74
7.3.110.0070.01014.78
7.3.100.0050.01014.81
7.3.90.0030.01114.77
7.3.80.0030.01114.83
7.3.70.0090.00714.90
7.3.60.0050.00914.99
7.3.50.0030.01014.64
7.3.40.0020.01114.85
7.3.30.0060.00714.80
7.3.20.0030.00716.67
7.3.10.0120.00216.55
7.3.00.0060.01116.56
7.2.330.0110.00716.84
7.2.320.0150.00516.90
7.2.310.0130.01016.72
7.2.300.0130.00316.67
7.2.290.0110.00616.64
7.2.260.0050.01215.16
7.2.250.0090.00615.02
7.2.240.0110.00615.32
7.2.230.0060.00515.16
7.2.220.0050.01015.12
7.2.210.0110.00515.25
7.2.200.0030.00814.98
7.2.190.0050.01114.98
7.2.180.0070.00714.92
7.2.170.0110.00315.16
7.2.160.0000.01515.13
7.2.150.0080.00517.08
7.2.140.0080.00616.89
7.2.130.0060.01016.64
7.2.120.0080.00716.82
7.2.110.0080.01116.75
7.2.100.0090.00816.70
7.2.90.0110.00816.85
7.2.80.0080.00816.74
7.2.70.0110.00916.74
7.2.60.0090.00816.79
7.2.50.0070.00816.78
7.2.40.0080.01016.77
7.2.30.0080.01116.93
7.2.20.0060.01016.71
7.2.10.0120.00316.69
7.2.00.0100.00617.47
7.1.330.0060.00815.73
7.1.320.0050.01215.95
7.1.310.0040.01015.77
7.1.300.0050.00615.80
7.1.290.0020.01215.57
7.1.280.0030.01015.95
7.1.270.0020.01115.89
7.1.260.0060.00815.87
7.1.250.0040.00915.80
7.1.240.0020.01315.81
7.1.230.0050.00715.78
7.1.220.0000.01715.60
7.1.210.0050.01115.78
7.1.200.0020.01115.79
7.1.190.0090.00515.94
7.1.180.0020.01215.89
7.1.170.0020.01015.84
7.1.160.0060.00915.85
7.1.150.0050.00815.86
7.1.140.0070.00615.88
7.1.130.0050.01015.83
7.1.120.0050.00715.77
7.1.110.0060.00615.81
7.1.100.0060.00816.53
7.1.90.0090.00315.71
7.1.80.0060.00715.77
7.1.70.0040.00916.18
7.1.60.0050.01217.11
7.1.50.0050.01316.30
7.1.40.0050.00715.83
7.1.30.0080.00615.70
7.1.20.0080.00915.76
7.1.10.0030.00815.69
7.1.00.0080.02617.86
7.0.330.0050.00515.33
7.0.320.0070.00515.24
7.0.310.0050.00815.49
7.0.300.0060.00915.36
7.0.290.0000.01715.59
7.0.280.0070.00815.42
7.0.270.0050.01015.29
7.0.260.0090.00215.45
7.0.250.0070.00715.29
7.0.240.0030.00815.56
7.0.230.0020.01115.39
7.0.220.0060.00515.58
7.0.210.0000.01115.45
7.0.200.0050.00815.86
7.0.190.0100.00315.49
7.0.180.0030.00815.27
7.0.170.0050.00915.52
7.0.160.0020.01015.36
7.0.150.0060.00915.48
7.0.140.0050.02817.54
7.0.130.0110.00215.47
7.0.120.0030.00915.46
7.0.110.0040.00815.40
7.0.100.0080.03416.86
7.0.90.0080.02616.90
7.0.80.0110.02916.92
7.0.70.0100.01516.92
7.0.60.0070.02916.90
7.0.50.0070.03117.06
7.0.40.0100.02915.81
7.0.30.0070.02715.87
7.0.20.0070.02915.80
7.0.10.0080.02015.73
7.0.00.0070.03015.71
5.6.400.0060.00714.27
5.6.390.0110.00214.57
5.6.380.0060.00414.53
5.6.370.0070.00714.59
5.6.360.0060.00914.45
5.6.350.0060.00814.58
5.6.340.0050.00914.53
5.6.330.0110.00614.42
5.6.320.0050.00414.48
5.6.310.0060.00614.55
5.6.300.0050.00914.52
5.6.290.0040.00914.36
5.6.280.0030.03016.67
5.6.270.0030.00714.42
5.6.260.0050.00714.58
5.6.250.0090.02516.54
5.6.240.0060.03116.51
5.6.230.0060.03016.49
5.6.220.0060.03016.45
5.6.210.0070.03116.63
5.6.200.0030.03816.64
5.6.190.0060.02916.60
5.6.180.0040.02416.80
5.6.170.0070.03316.59
5.6.160.0060.03116.61
5.6.150.0050.03016.84
5.6.140.0070.02916.82
5.6.130.0040.02616.80
5.6.120.0060.02616.67
5.6.110.0060.03316.63
5.6.100.0070.01616.54
5.6.90.0020.03216.47
5.6.80.0070.01416.48
5.6.70.0050.01716.39
5.6.60.0090.01516.38
5.6.50.0020.02216.29
5.6.40.0070.01716.34
5.6.30.0080.01616.28
5.6.20.0050.03116.37
5.6.10.0060.02516.43
5.6.00.0040.02716.30
5.5.380.0100.03016.40
5.5.370.0090.02416.58
5.5.360.0060.03316.51
5.5.350.0100.02916.41
5.5.340.0060.03216.62
5.5.330.0040.02916.70
5.5.320.0040.03816.59
5.5.310.0090.03016.54
5.5.300.0040.03016.65
5.5.290.0030.03216.50
5.5.280.0070.03016.47
5.5.270.0080.02016.67
5.5.260.0040.01916.59
5.5.250.0030.03316.40
5.5.240.0080.01716.20
5.5.230.0050.01816.21
5.5.220.0030.02316.08
5.5.210.0050.03016.21
5.5.200.0020.02516.26
5.5.190.0050.01716.29
5.5.180.0040.02316.23
5.5.170.0070.01114.10
5.5.160.0050.02516.16
5.5.150.0040.02316.24
5.5.140.0040.02316.29
5.5.130.0070.01916.24
5.5.120.0070.01816.09
5.5.110.0050.01816.20
5.5.100.0030.02016.33
5.5.90.0070.02416.18
5.5.80.0050.01916.33
5.5.70.0050.01816.35
5.5.60.0040.02116.32
5.5.50.0080.02516.32
5.5.40.0020.02416.11
5.5.30.0090.01516.34
5.5.20.0060.02516.19
5.5.10.0040.01916.12
5.5.00.0080.01716.16
5.4.450.0080.02915.30
5.4.440.0050.02915.30
5.4.430.0050.02615.21
5.4.420.0050.03315.30
5.4.410.0060.01615.21
5.4.400.0000.02415.12
5.4.390.0030.01415.11
5.4.380.0050.01715.15
5.4.370.0050.01615.20
5.4.360.0050.01815.17
5.4.350.0070.01315.20
5.4.340.0070.03015.15
5.4.330.0060.00613.21
5.4.320.0050.01815.21
5.4.310.0050.02115.21
5.4.300.0070.02315.20
5.4.290.0040.01615.09
5.4.280.0060.02215.09
5.4.270.0060.01615.21
5.4.260.0060.01715.10
5.4.250.0040.01715.15
5.4.240.0050.02115.21
5.4.230.0050.02315.10
5.4.220.0010.01915.18
5.4.210.0040.02415.18
5.4.200.0030.01615.20
5.4.190.0030.02315.09
5.4.180.0080.01615.19
5.4.170.0030.01615.19
5.4.160.0030.01815.09
5.4.150.0040.01715.10
5.4.140.0040.01914.28
5.4.130.0060.01914.28
5.4.120.0010.01914.26
5.4.110.0040.01614.26
5.4.100.0070.02714.31
5.4.90.0020.03014.23
5.4.80.0050.02814.25
5.4.70.0060.02014.27
5.4.60.0010.01914.24
5.4.50.0040.03014.22
5.4.40.0050.03114.26
5.4.30.0020.02114.25
5.4.20.0080.01714.29
5.4.10.0070.02714.28
5.4.00.0030.02914.10
5.3.290.0040.02013.72
5.3.280.0030.02013.69
5.3.270.0050.01913.70
5.3.260.0050.01713.72
5.3.250.0030.01913.66
5.3.240.0040.02813.73
5.3.230.0010.01913.72
5.3.220.0030.01713.66
5.3.210.0040.01713.70
5.3.200.0080.02313.67
5.3.190.0030.03113.69
5.3.180.0020.01913.69
5.3.170.0060.03113.67
5.3.160.0020.02813.71
5.3.150.0070.02213.65
5.3.140.0030.02013.71
5.3.130.0070.02713.68
5.3.120.0070.01513.69
5.3.110.0080.02613.70
5.3.100.0060.02213.49
5.3.90.0080.02613.51
5.3.80.0030.03013.46
5.3.70.0040.02913.52
5.3.60.0040.01913.52
5.3.50.0070.02613.46
5.3.40.0060.02813.49
5.3.30.0060.02913.45
5.3.20.0070.02513.38
5.3.10.0060.01513.34
5.3.00.0070.02713.35
5.2.170.0030.06311.06
5.2.160.0000.06311.03
5.2.150.0030.06311.20
5.2.140.0030.02711.27
5.2.130.0170.05011.26
5.2.120.0000.05011.18
5.2.110.0100.05711.11
5.2.100.0000.06711.23
5.2.90.0030.05711.04
5.2.80.0030.04311.20
5.2.70.0100.05311.13
5.2.60.0030.06311.20
5.2.50.0100.05010.96
5.2.40.0030.06310.91
5.2.30.0030.06010.91
5.2.20.0070.05711.09
5.2.10.0070.03010.84
5.2.00.0030.05010.86
5.1.60.0030.05010.10
5.1.50.0030.03310.05
5.1.40.0000.0539.88
5.1.30.0100.05310.45
5.1.20.0000.06310.45
5.1.10.0070.05010.20
5.1.00.0070.0509.98
5.0.50.0100.0408.61
5.0.40.0030.0438.46
5.0.30.0070.0608.33
5.0.20.0070.0378.25
5.0.10.0030.0438.28
5.0.00.0070.0638.27
4.4.90.0000.0377.91
4.4.80.0000.0377.91
4.4.70.0030.0337.91
4.4.60.0030.0337.91
4.4.50.0030.0277.91
4.4.40.0030.0507.91
4.4.30.0030.0337.91
4.4.20.0000.0237.91
4.4.10.0000.0377.91
4.4.00.0000.0537.91
4.3.110.0000.0207.91
4.3.100.0000.0277.91
4.3.90.0100.0277.91
4.3.80.0000.0537.91
4.3.70.0000.0237.91
4.3.60.0070.0337.91
4.3.50.0030.0337.91
4.3.40.0030.0277.91
4.3.30.0000.0377.91
4.3.20.0000.0277.91
4.3.10.0000.0337.91
4.3.00.0000.0337.91

preferences:
75.55 ms | 401 KiB | 5 Q