3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyArrayAccess implements \ArrayAccess { public function offsetExists($offset) { } public function offsetSet($offset, $value) { } public function offsetGet($offset) { } public function offsetUnset($offset) { } } function test(array $arr) { echo "test"; } function test2(\ArrayAccess $arr) { echo "test2"; } $arrObj = new MyArrayAccess(); test(array()); test($arrObj);

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.0190.00018.68
8.3.50.0070.01222.72
8.3.40.0140.00018.85
8.3.30.0070.00719.04
8.3.20.0070.00020.28
8.3.10.0030.00623.66
8.3.00.0090.00019.15
8.2.180.0120.00316.50
8.2.170.0100.01022.96
8.2.160.0100.00320.43
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00421.00
8.2.110.0090.00020.57
8.2.100.0060.00617.71
8.2.90.0040.00418.00
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0050.00317.93
8.2.50.0040.00418.07
8.2.40.0080.00017.91
8.2.30.0030.00617.97
8.2.20.0040.00417.81
8.2.10.0040.00418.06
8.2.00.0060.00317.61
8.1.280.0040.01125.92
8.1.270.0000.00923.92
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0000.00822.02
8.1.230.0000.01120.89
8.1.220.0000.00917.79
8.1.210.0030.00518.89
8.1.200.0000.00917.22
8.1.190.0040.00417.22
8.1.180.0090.00018.10
8.1.170.0040.00418.50
8.1.160.0050.00221.93
8.1.150.0040.00418.88
8.1.140.0050.00317.41
8.1.130.0040.00417.82
8.1.120.0040.00317.44
8.1.110.0080.00017.50
8.1.100.0050.00217.52
8.1.90.0000.00817.47
8.1.80.0000.00717.44
8.1.70.0040.00217.41
8.1.60.0070.00017.48
8.1.50.0000.00817.55
8.1.40.0050.00317.47
8.1.30.0060.00317.63
8.1.20.0000.00817.53
8.1.10.0030.00517.57
8.1.00.0030.00517.44
8.0.300.0090.00020.13
8.0.290.0040.00416.75
8.0.280.0000.00818.35
8.0.270.0040.00417.26
8.0.260.0060.00017.25
8.0.250.0070.00017.01
8.0.240.0040.00416.93
8.0.230.0000.00717.00
8.0.220.0030.00316.82
8.0.210.0030.00316.93
8.0.200.0000.00717.06
8.0.190.0050.00316.98
8.0.180.0000.00717.00
8.0.170.0040.00416.98
8.0.160.0000.00716.99
8.0.150.0000.00716.93
8.0.140.0040.00416.68
8.0.130.0100.00013.39
8.0.120.0080.00016.95
8.0.110.0000.00716.98
8.0.100.0030.00516.93
8.0.90.0000.00817.07
8.0.80.0030.01316.88
8.0.70.0050.00216.84
8.0.60.0040.00416.86
8.0.50.0000.00816.80
8.0.30.0100.01117.01
8.0.20.0110.00917.40
8.0.10.0040.00416.95
8.0.00.0020.01516.88
7.4.330.0050.00015.05
7.4.320.0030.00316.63
7.4.300.0060.00016.58
7.4.290.0030.00316.49
7.4.280.0040.00416.46
7.4.270.0000.00716.59
7.4.260.0030.00516.48
7.4.250.0030.00516.48
7.4.240.0010.00616.49
7.4.230.0030.00316.43
7.4.220.0080.01016.68
7.4.210.0030.01316.64
7.4.200.0050.00316.42
7.4.160.0060.00916.44
7.4.150.0110.00717.40
7.4.140.0140.00317.86
7.4.130.0130.00316.59
7.4.120.0050.01216.61
7.4.110.0060.01216.47
7.4.100.0030.01316.59
7.4.90.0100.00716.53
7.4.80.0060.01119.39
7.4.70.0030.01316.38
7.4.60.0050.01316.65
7.4.50.0000.00816.24
7.4.40.0050.01416.64
7.4.30.0070.01016.69
7.4.00.0090.00615.09
7.3.330.0000.00713.16
7.3.320.0060.00013.19
7.3.310.0040.00416.23
7.3.300.0000.00616.31
7.3.290.0100.01016.27
7.3.280.0070.01016.34
7.3.270.0160.00617.40
7.3.260.0110.01416.27
7.3.250.0120.00816.24
7.3.240.0080.01616.33
7.3.230.0070.01016.39
7.3.210.0130.00316.30
7.3.200.0120.01219.39
7.3.190.0130.00316.61
7.3.180.0040.01216.53
7.3.170.0090.00616.34
7.3.160.0100.01416.45
7.2.330.0090.00916.35
7.2.320.0140.00316.32
7.2.310.0040.01816.39
7.2.300.0140.00316.42
7.2.290.0060.01116.42
7.2.60.0030.01016.61
7.2.00.0000.01619.43
7.1.200.0070.00715.88
7.1.100.0040.00817.95
7.1.70.0060.01217.11
7.1.60.0040.01919.46
7.1.50.0100.01016.92
7.1.00.0030.07722.28
7.0.200.0060.00316.97
7.0.140.0000.07722.15
7.0.60.0100.05020.02
7.0.50.0100.06317.92
7.0.40.0270.03320.05
7.0.30.0300.05020.16
7.0.20.0200.06720.30
7.0.10.0070.08320.33
7.0.00.0130.08320.05
5.6.280.0070.07021.10
5.6.210.0030.04020.74
5.6.200.0170.05318.23
5.6.190.0030.09020.52
5.6.180.3700.04720.63
5.6.170.0300.07720.48
5.6.160.0000.05020.51
5.6.150.0070.03718.12
5.6.140.0070.06018.17
5.6.130.0030.05318.12
5.6.120.0070.04021.00
5.6.110.0000.07020.97
5.6.100.0070.08021.05
5.6.90.0030.04321.13
5.6.80.0130.07720.51
5.6.70.4400.04020.33
5.5.350.0300.07720.45
5.5.340.0100.06318.02
5.5.330.0070.04320.13
5.5.320.0370.05320.37
5.5.310.0270.04020.27
5.5.300.0070.07317.95
5.5.290.0070.08317.98
5.5.280.0030.09320.88
5.5.270.0070.05020.77
5.5.260.0070.05020.90
5.5.250.0100.07020.58
5.5.240.0300.06720.36
5.4.450.0200.05019.55
5.4.440.0530.04019.20
5.4.430.0300.04319.32
5.4.420.0200.05319.40
5.4.410.0400.04019.30
5.4.400.0200.04318.84
5.4.390.0630.03319.09
5.4.380.0300.08018.80
5.4.370.0470.06018.79
5.4.360.0370.05018.48
5.4.350.0370.06018.78
5.4.340.0400.08718.62
5.4.320.0090.03312.51
5.4.310.0080.03712.50
5.4.300.0050.04212.51
5.4.290.0080.03712.51
5.4.280.0050.03712.40
5.4.270.0050.03612.40
5.4.260.0070.03512.41
5.4.250.0050.03912.40
5.4.240.0030.04012.40
5.4.230.0040.03912.40
5.4.220.0050.03712.40
5.4.210.0060.03512.40
5.4.200.0040.04112.40
5.4.190.0070.04112.39
5.4.180.0090.03412.39
5.4.170.0050.03712.40
5.4.160.0070.03512.39
5.4.150.0050.03612.39
5.4.140.0030.04012.07
5.4.130.0040.04512.07
5.4.120.0050.03912.02
5.4.110.0030.03912.02
5.4.100.0070.03512.02
5.4.90.0030.04312.02
5.4.80.0040.04012.02
5.4.70.0070.03512.02
5.4.60.0060.03612.02
5.4.50.0060.03812.01
5.4.40.0070.03812.00
5.4.30.0050.03611.99
5.4.20.0100.03112.00
5.4.10.0090.03611.99
5.4.00.0050.03711.49
5.3.290.0060.04312.80
5.3.280.0060.03812.71
5.3.270.0070.04312.72
5.3.260.0070.03712.72
5.3.250.0070.04412.72
5.3.240.0080.04312.72
5.3.230.0100.04312.71
5.3.220.0050.04012.68
5.3.210.0060.03812.68
5.3.200.0090.03412.68
5.3.190.0050.04712.68
5.3.180.0050.04012.68
5.3.170.0060.04112.66
5.3.160.0050.03812.67
5.3.150.0070.03612.67
5.3.140.0060.03712.66
5.3.130.0050.04012.65
5.3.120.0030.04112.66
5.3.110.0040.04012.66
5.3.100.0030.04012.14
5.3.90.0060.03712.12
5.3.80.0070.04112.11
5.3.70.0060.03712.11
5.3.60.0050.03712.10
5.3.50.0040.03712.05
5.3.40.0060.03512.05
5.3.30.0050.03512.00
5.3.20.0060.03511.79
5.3.10.0060.03411.75
5.3.00.0070.03411.74
5.2.170.0040.0319.23
5.2.160.0050.0299.22
5.2.150.0030.0319.23
5.2.140.0040.0309.23
5.2.130.0050.0289.19
5.2.120.0040.0299.18
5.2.110.0030.0309.20
5.2.100.0060.0279.19
5.2.90.0020.0319.19
5.2.80.0040.0309.19
5.2.70.0050.0309.18
5.2.60.0040.0309.14
5.2.50.0070.0279.11
5.2.40.0040.0299.09
5.2.30.0040.0309.06
5.2.20.0030.0309.05
5.2.10.0060.0268.95
5.2.00.0060.0278.82
5.1.60.0030.0248.10
5.1.50.0050.0238.09
5.1.40.0010.0278.08
5.1.30.0030.0278.43
5.1.20.0060.0248.45
5.1.10.0060.0328.17
5.1.00.0030.0308.17
5.0.50.0040.0206.65
5.0.40.0040.0186.51
5.0.30.0020.0326.32
5.0.20.0040.0196.29
5.0.10.0020.0216.26
5.0.00.0020.0326.26
4.4.90.0020.0164.78
4.4.80.0020.0164.75
4.4.70.0030.0154.76
4.4.60.0030.0164.75
4.4.50.0040.0144.77
4.4.40.0040.0244.71
4.4.30.0030.0154.76
4.4.20.0010.0174.84
4.4.10.0030.0154.85
4.4.00.0030.0244.76
4.3.110.0010.0174.67
4.3.100.0030.0144.66
4.3.90.0010.0164.63
4.3.80.0030.0244.59
4.3.70.0010.0204.63
4.3.60.0050.0164.63
4.3.50.0010.0184.62
4.3.40.0010.0264.54
4.3.30.0040.0143.30
4.3.20.0000.0183.28
4.3.10.0010.0163.23
4.3.00.0170.01715.68

preferences:
41.32 ms | 401 KiB | 5 Q