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) { } function test2(\ArrayAccess $arr) { } $arrObj = new MyArrayAccess(); test([]); //result: works! test($arrObj); //result: does NOT work test2([]); //result: does NOT work test2($arrObj); // result: works!

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.0080.01218.45
8.3.50.0070.01222.92
8.3.40.0140.00418.84
8.3.30.0070.00719.04
8.3.20.0040.00420.16
8.3.10.0080.00023.66
8.3.00.0040.00419.25
8.2.180.0070.00716.63
8.2.170.0070.00722.96
8.2.160.0030.01020.45
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0090.00026.16
8.2.120.0040.00421.03
8.2.110.0040.00422.20
8.2.100.0060.00618.16
8.2.90.0000.00819.23
8.2.80.0000.01017.97
8.2.70.0000.00817.34
8.2.60.0040.00418.04
8.2.50.0060.00318.07
8.2.40.0030.00518.20
8.2.30.0000.00917.94
8.2.20.0000.00717.65
8.2.10.0000.00818.11
8.2.00.0040.00417.73
8.1.280.0060.01625.92
8.1.270.0040.00423.80
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00923.73
8.1.230.0080.00419.15
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0100.00017.34
8.1.190.0050.00317.23
8.1.180.0000.00918.10
8.1.170.0040.00418.46
8.1.160.0070.00021.98
8.1.150.0040.00418.85
8.1.140.0000.00717.37
8.1.130.0070.00017.74
8.1.120.0000.00717.39
8.1.110.0040.00417.47
8.1.100.0000.00817.50
8.1.90.0040.00317.44
8.1.80.0000.00717.38
8.1.70.0070.00017.36
8.1.60.0030.00517.58
8.1.50.0050.00317.53
8.1.40.0070.00017.45
8.1.30.0090.00017.55
8.1.20.0030.00617.64
8.1.10.0000.00717.66
8.1.00.0040.00417.53
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0030.00318.39
8.0.270.0030.00317.26
8.0.260.0000.00717.18
8.0.250.0030.00317.07
8.0.240.0070.00016.93
8.0.230.0040.00416.99
8.0.220.0030.00316.86
8.0.210.0000.00716.87
8.0.200.0060.00017.04
8.0.190.0000.00817.05
8.0.180.0000.00716.96
8.0.170.0030.00516.91
8.0.160.0030.00316.84
8.0.150.0000.00716.90
8.0.140.0040.00416.77
8.0.130.0040.00413.32
8.0.120.0080.00016.93
8.0.110.0040.00416.85
8.0.100.0050.00316.83
8.0.90.0040.00416.90
8.0.80.0120.00317.02
8.0.70.0040.00416.84
8.0.60.0060.00317.00
8.0.50.0000.00716.89
8.0.30.0080.01017.02
8.0.20.0100.01117.40
8.0.10.0050.00216.97
8.0.00.0100.00616.80
7.4.330.0030.00315.14
7.4.320.0030.00316.51
7.4.300.0000.00616.52
7.4.290.0030.00316.63
7.4.280.0000.00716.45
7.4.270.0040.00416.53
7.4.260.0030.00316.62
7.4.250.0000.00716.57
7.4.240.0000.00816.58
7.4.230.0000.00716.43
7.4.220.0110.00716.37
7.4.210.0090.00616.49
7.4.200.0030.00516.58
7.4.160.0190.01116.57
7.4.150.0150.00417.40
7.4.140.0140.00617.86
7.4.130.0070.01416.63
7.4.120.0050.01216.53
7.4.110.0030.02116.50
7.4.100.0070.01016.61
7.4.90.0110.00616.59
7.4.80.0040.01219.39
7.4.70.0070.01016.52
7.4.60.0040.01116.59
7.4.50.0040.00416.64
7.4.40.0070.01016.36
7.4.30.0090.00616.44
7.4.10.0150.00416.44
7.4.00.0120.00515.64
7.3.330.0070.00013.12
7.3.320.0060.00013.33
7.3.310.0040.00416.36
7.3.300.0060.00016.19
7.3.290.0170.00316.29
7.3.280.0090.00716.32
7.3.270.0110.01117.40
7.3.260.0160.00716.34
7.3.250.0150.00616.44
7.3.240.0120.01216.38
7.3.230.0160.00816.39
7.3.210.0030.01416.36
7.3.200.0080.01219.39
7.3.190.0090.00616.35
7.3.180.0040.01116.55
7.3.170.0100.01016.39
7.3.160.0130.01016.25
7.3.130.0100.00616.21
7.3.120.0030.01416.60
7.3.110.0000.01516.33
7.3.100.0000.01316.29
7.3.90.0070.01016.25
7.3.80.0040.00816.24
7.3.70.0070.00416.45
7.3.60.0030.01216.36
7.3.50.0000.00916.37
7.3.40.0070.00416.45
7.3.30.0030.01016.27
7.3.20.0040.00818.18
7.3.10.0170.00717.96
7.3.00.0200.00818.07
7.2.330.0070.01016.55
7.2.320.0100.00616.45
7.2.310.0090.00716.49
7.2.300.0060.01116.73
7.2.290.0060.00916.45
7.2.260.0130.00716.65
7.2.250.0130.00316.76
7.2.240.0030.00916.42
7.2.230.0040.01516.64
7.2.220.0040.00816.48
7.2.210.0030.01016.38
7.2.200.0060.00316.45
7.2.190.0060.00916.59
7.2.180.0000.01416.45
7.2.170.0030.00616.32
7.2.160.0060.00616.51
7.2.150.0040.01618.23
7.2.140.0220.00618.37
7.2.130.0230.00818.22
7.2.120.0170.01418.25
7.2.110.0150.01518.41
7.2.100.0070.00718.35
7.2.90.0110.00718.23
7.2.80.0070.01018.32
7.2.70.0040.01218.30
7.2.60.0050.00717.53
7.2.50.0000.01518.18
7.2.40.0040.01218.47
7.2.30.0070.01118.51
7.2.20.0070.01018.37
7.2.10.0040.01118.22
7.2.00.0090.00818.94
7.1.330.0070.01017.21
7.1.320.0040.01117.16
7.1.310.0040.00817.16
7.1.300.0060.01017.10
7.1.290.0040.00717.32
7.1.280.0060.00617.19
7.1.270.0040.00417.41
7.1.260.0130.01017.29
7.1.250.0220.00417.19
7.1.240.0060.01817.08
7.1.230.0080.01117.16
7.1.220.0000.01317.25
7.1.210.0000.01617.23
7.1.200.0130.00316.49
7.1.190.0060.01217.26
7.1.180.0070.01117.13
7.1.170.0080.01217.27
7.1.160.0060.00917.34
7.1.150.0140.01017.09
7.1.140.0220.00617.48
7.1.130.0120.01517.20
7.1.120.0180.00617.25
7.1.110.0120.01217.24
7.1.100.0100.01117.63
7.1.90.0130.01317.34
7.1.80.0140.01117.32
7.1.70.0130.00317.22
7.1.60.0090.01218.38
7.1.50.0090.01416.93
7.1.40.0140.01017.38
7.1.30.0080.01717.30
7.1.20.0110.01617.42
7.1.10.0030.01017.29
7.1.00.0100.04219.86
7.0.330.0130.00916.91
7.0.320.0100.01716.86
7.0.310.0070.01616.79
7.0.300.0240.00416.97
7.0.290.0240.00317.05
7.0.280.0070.01916.89
7.0.270.0120.01216.86
7.0.260.0220.00516.91
7.0.250.0120.01017.18
7.0.240.0190.00817.00
7.0.230.0120.01017.00
7.0.220.0190.00816.89
7.0.210.0110.01416.85
7.0.200.0080.00816.92
7.0.190.0050.02316.88
7.0.180.0150.01016.88
7.0.170.0150.01116.97
7.0.160.0150.00917.14
7.0.150.0170.00616.88
7.0.140.0120.03919.52
7.0.130.0190.00917.03
7.0.120.0110.01817.14
7.0.110.0210.00416.93
7.0.100.0160.00817.01
7.0.90.0170.00916.97
7.0.80.0150.01117.03
7.0.70.0150.01216.95
7.0.60.0140.02218.29
7.0.50.0110.04917.44
7.0.40.0060.03117.59
7.0.30.0150.02617.65
7.0.20.0200.04417.49
7.0.10.0120.04217.44
7.0.00.0110.04217.69
5.6.400.0050.02415.80
5.6.390.0180.00915.69
5.6.380.0170.00615.82
5.6.370.0130.00916.07
5.6.360.0160.01215.62
5.6.350.0180.00916.18
5.6.340.0130.01315.95
5.6.330.0150.00412.06
5.6.320.0130.01715.70
5.6.310.0230.00715.91
5.6.300.0180.00916.05
5.6.290.0140.01415.87
5.6.280.0100.04018.42
5.6.270.0210.00715.70
5.6.260.0140.01415.99
5.6.250.0150.01215.99
5.6.240.0170.00915.80
5.6.230.0210.00815.80
5.6.220.0180.00915.98
5.6.210.0110.05018.13
5.6.200.0110.04716.88
5.6.190.0170.03718.31
5.6.180.0290.02418.26
5.6.170.0230.04018.16
5.6.160.0110.04518.18
5.6.150.0100.04416.91
5.6.140.0170.04017.06
5.6.130.0080.02816.93
5.6.120.0150.03118.46
5.6.110.0110.04118.35
5.6.100.0150.04418.42
5.6.90.0110.04418.46
5.6.80.0180.03818.04
5.6.70.0040.02115.87
5.6.60.0150.01115.99
5.6.50.0210.00615.87
5.6.40.0140.01415.89
5.6.30.0180.00615.50
5.6.20.0230.00315.63
5.6.10.0180.00915.73
5.6.00.0110.01415.74
5.5.380.0160.01216.06
5.5.370.0220.00615.95
5.5.360.0050.01915.76
5.5.350.0120.03618.08
5.5.340.0120.04016.87
5.5.330.0130.04618.01
5.5.320.0120.04518.04
5.5.310.0220.04318.06
5.5.300.0090.03116.80
5.5.290.0030.04817.01
5.5.280.0060.03618.41
5.5.270.0120.02418.16
5.5.260.0190.04218.43
5.5.250.0110.05218.14
5.5.240.0100.02518.04
5.5.230.0150.01115.76
5.5.220.0110.01115.59
5.5.210.0110.01415.74
5.5.200.0170.01015.90
5.5.190.0150.01015.57
5.5.180.0160.01115.49
5.5.170.0000.02315.70
5.5.160.0110.01415.86
5.5.150.0140.01115.61
5.5.140.0190.00515.74
5.5.130.0110.01115.82
5.5.120.0080.01615.83
5.5.110.0120.01215.64
5.5.100.0090.01415.75
5.5.90.0110.01115.66
5.5.80.0150.01115.89
5.5.70.0140.01315.67
5.5.60.0160.00715.48
5.5.50.0190.00415.56
5.5.40.0180.00715.78
5.5.30.0150.01115.71
5.5.20.0120.01615.78
5.5.10.0130.00915.67
5.5.00.0200.00715.83
5.4.450.0370.03316.18
5.4.440.0430.02616.21
5.4.430.0500.04715.96
5.4.420.0510.03315.88
5.4.410.0110.02916.01
5.4.400.0510.03415.80
5.4.390.0500.03415.74
5.4.380.0200.04015.66
5.4.370.0280.03215.49
5.4.360.0230.02915.64
5.4.350.0280.02315.60
5.4.340.0250.03215.53
5.4.330.0090.01112.81
5.4.320.0110.01912.53
5.4.310.0080.02412.52
5.4.300.0070.02312.45
5.4.290.0080.02312.49
5.4.280.0090.01912.42
5.4.270.0090.02112.62
5.4.260.0060.02412.45
5.4.250.0070.02312.36
5.4.240.0060.02412.41
5.4.230.0100.02112.42
5.4.220.0060.02412.53
5.4.210.0100.02012.50
5.4.200.0050.02512.32
5.4.190.0070.02112.36
5.4.180.0080.02212.37
5.4.170.0090.02312.46
5.4.160.0100.02112.45
5.4.150.0100.02012.39
5.4.140.0090.02012.46
5.4.130.0070.02312.26
5.4.120.0060.02212.36
5.4.110.0050.02512.35
5.4.100.0080.02112.17
5.4.90.0100.02112.17
5.4.80.0090.02112.28
5.4.70.0110.01912.33
5.4.60.0060.02312.37
5.4.50.0080.02012.20
5.4.40.0080.01812.21
5.4.30.0110.02012.33
5.4.20.0060.02312.29
5.4.10.0090.02512.28
5.4.00.0060.02512.06
5.3.290.0060.03812.80
5.3.280.0030.04012.71
5.3.270.0100.04312.73
5.3.260.0070.03712.71
5.3.250.0060.03612.72
5.3.240.0070.03712.72
5.3.230.0100.03312.71
5.3.220.0080.03712.68
5.3.210.0060.03812.68
5.3.200.0070.03912.68
5.3.190.0050.03912.68
5.3.180.0060.03612.67
5.3.170.0080.03412.66
5.3.160.0060.03612.67
5.3.150.0040.03912.67
5.3.140.0050.03912.66
5.3.130.0030.04212.66
5.3.120.0030.04212.66
5.3.110.0060.03912.66
5.3.100.0080.03412.14
5.3.90.0050.03712.12
5.3.80.0040.03912.11
5.3.70.0050.03712.11
5.3.60.0040.03912.10
5.3.50.0050.04012.05
5.3.40.0080.03512.05
5.3.30.0050.04312.00
5.3.20.0030.04811.79
5.3.10.0050.03711.75
5.3.00.0080.03711.74
5.2.170.0030.0339.23
5.2.160.0040.0399.23
5.2.150.0040.0379.23
5.2.140.0040.0319.23
5.2.130.0050.0309.19
5.2.120.0040.0299.19
5.2.110.0060.0279.20
5.2.100.0060.0329.19
5.2.90.0000.0339.19
5.2.80.0060.0299.18
5.2.70.0060.0299.19
5.2.60.0030.0329.14
5.2.50.0040.0309.11
5.2.40.0020.0319.09
5.2.30.0050.0319.06
5.2.20.0060.0389.04
5.2.10.0040.0288.95
5.2.00.0080.0268.82
5.1.60.0080.0218.11
5.1.50.0030.0268.10
5.1.40.0040.0258.08
5.1.30.0040.0268.43
5.1.20.0040.0278.45
5.1.10.0050.0258.18
5.1.00.0010.0288.18
5.0.50.0030.0216.65
5.0.40.0040.0186.51
5.0.30.0030.0326.32
5.0.20.0030.0206.29
5.0.10.0040.0196.27
5.0.00.0020.0326.26
4.4.90.0030.0154.78
4.4.80.0030.0154.75
4.4.70.0030.0154.75
4.4.60.0020.0164.75
4.4.50.0040.0144.77
4.4.40.0030.0274.71
4.4.30.0030.0154.75
4.4.20.0030.0154.84
4.4.10.0030.0154.85
4.4.00.0030.0244.76
4.3.110.0030.0154.67
4.3.100.0020.0164.66
4.3.90.0020.0154.64
4.3.80.0020.0254.59
4.3.70.0030.0134.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0030.0244.53
4.3.30.0030.0153.30
4.3.20.0030.0183.28
4.3.10.0030.0203.23
4.3.00.0100.0237.86

preferences:
44.33 ms | 401 KiB | 5 Q