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([]); test($arrObj); test2([]); test2($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.0080.01218.68
8.3.50.0070.01122.90
8.3.40.0140.00419.02
8.3.30.0100.00319.10
8.3.20.0040.00420.43
8.3.10.0060.00323.66
8.3.00.0050.00319.25
8.2.180.0150.00016.50
8.2.170.0130.00722.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00720.95
8.2.110.0090.00020.57
8.2.100.0080.00318.09
8.2.90.0080.00019.13
8.2.80.0050.00317.97
8.2.70.0080.00017.50
8.2.60.0030.00517.93
8.2.50.0080.00018.07
8.2.40.0060.00318.09
8.2.30.0000.00817.95
8.2.20.0030.00617.63
8.2.10.0060.00217.94
8.2.00.0080.00017.63
8.1.280.0030.01725.92
8.1.270.0060.01223.71
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00718.87
8.1.230.0040.00719.09
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0030.00717.35
8.1.190.0000.00817.25
8.1.180.0000.00818.10
8.1.170.0050.00318.57
8.1.160.0040.00422.07
8.1.150.0000.00718.84
8.1.140.0040.00417.51
8.1.130.0000.00717.84
8.1.120.0040.00417.36
8.1.110.0040.00417.29
8.1.100.0050.00317.48
8.1.90.0000.00717.52
8.1.80.0000.00717.45
8.1.70.0000.00817.45
8.1.60.0030.00517.65
8.1.50.0050.00217.52
8.1.40.0000.00817.50
8.1.30.0000.00817.64
8.1.20.0030.00617.73
8.1.10.0000.00717.46
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0000.00718.46
8.0.270.0000.00717.25
8.0.260.0000.00717.27
8.0.250.0070.00017.05
8.0.240.0000.00716.96
8.0.230.0070.00016.91
8.0.220.0030.00316.97
8.0.210.0000.00716.83
8.0.200.0030.00316.98
8.0.190.0040.00416.91
8.0.180.0040.00416.94
8.0.170.0050.00316.96
8.0.160.0040.00416.91
8.0.150.0020.00516.89
8.0.140.0040.00416.83
8.0.130.0040.00413.38
8.0.120.0030.00516.84
8.0.110.0030.00616.85
8.0.100.0000.00716.85
8.0.90.0000.00716.91
8.0.80.0000.01516.99
8.0.70.0040.00417.01
8.0.60.0000.00816.84
8.0.50.0070.00016.83
8.0.30.0110.00717.22
8.0.20.0130.01017.40
8.0.10.0080.00016.93
8.0.00.0100.00716.80
7.4.330.0000.00615.14
7.4.320.0000.00716.60
7.4.300.0000.00616.54
7.4.290.0000.00816.54
7.4.280.0040.00416.43
7.4.270.0000.00716.66
7.4.260.0070.00016.62
7.4.250.0080.00016.62
7.4.240.0020.00516.47
7.4.230.0030.00316.45
7.4.220.0100.01016.57
7.4.210.0110.00316.56
7.4.200.0070.00016.68
7.4.160.0100.00716.70
7.4.150.0100.01517.40
7.4.140.0050.01217.86
7.4.130.0100.00816.52
7.4.120.0110.00716.47
7.4.110.0140.01116.62
7.4.100.0070.01016.40
7.4.90.0080.00916.73
7.4.80.0120.00619.39
7.4.70.0100.01016.61
7.4.60.0060.01016.38
7.4.50.0030.00516.64
7.4.40.0060.01016.65
7.4.30.0090.00616.21
7.4.00.0090.00615.09
7.3.330.0040.00413.29
7.3.320.0000.00613.27
7.3.310.0000.00716.41
7.3.300.0000.00616.22
7.3.290.0090.00916.31
7.3.280.0070.00816.31
7.3.270.0120.00617.40
7.3.260.0070.01416.34
7.3.250.0170.00216.37
7.3.240.0120.00816.38
7.3.230.0090.00916.39
7.3.210.0070.01016.31
7.3.200.0080.00819.39
7.3.190.0100.00616.31
7.3.180.0120.00416.50
7.3.170.0080.01116.44
7.3.160.0060.01216.45
7.3.10.0070.00716.50
7.3.00.0110.00416.32
7.2.330.0050.01316.73
7.2.320.0110.00516.63
7.2.310.0160.01016.61
7.2.300.0050.01016.82
7.2.290.0070.01016.66
7.2.130.0090.00616.89
7.2.120.0210.00016.69
7.2.110.0100.01716.73
7.2.100.0030.01516.55
7.2.90.0050.00516.98
7.2.80.0040.00816.71
7.2.70.0170.01017.02
7.2.60.0110.00916.77
7.2.50.0100.00716.83
7.2.40.0210.00416.87
7.2.30.0100.01016.61
7.2.20.0070.01016.83
7.2.10.0140.01416.75
7.2.00.0030.01418.01
7.1.250.0040.01215.39
7.1.200.0070.00715.51
7.1.100.0000.01318.23
7.1.70.0000.00716.94
7.1.60.0070.01719.46
7.1.50.0070.01716.99
7.1.00.0030.07722.31
7.0.200.0000.00816.52
7.0.140.0030.07021.96
7.0.60.0070.03719.96
7.0.50.0130.04317.82
7.0.40.0030.05019.96
7.0.30.0270.06720.09
7.0.20.0400.07720.08
7.0.10.0230.07020.03
7.0.00.0100.08020.32
5.6.280.0030.07321.15
5.6.210.0270.06320.71
5.6.200.0070.08718.16
5.6.190.0130.08020.58
5.6.180.0230.04320.57
5.6.170.0370.07320.54
5.6.160.0000.07020.46
5.6.150.0070.07718.12
5.6.140.0070.04718.18
5.6.130.0070.05718.18
5.6.120.0030.07721.12
5.6.110.0200.07020.96
5.6.100.0100.08021.02
5.6.90.0100.08020.98
5.6.80.0130.03020.43
5.6.70.4270.04020.38
5.5.350.0130.06720.42
5.5.340.0130.04017.95
5.5.330.0000.07320.34
5.5.320.0230.04020.31
5.5.310.0200.04320.28
5.5.300.0100.07717.95
5.5.290.0070.08017.95
5.5.280.0070.08320.75
5.5.270.0100.08320.73
5.5.260.0070.06020.84
5.5.250.0070.08020.58
5.5.240.0030.08020.19
5.4.450.0270.05019.20
5.4.440.0800.04319.28
5.4.430.0400.03719.52
5.4.420.0530.04719.39
5.4.410.0230.04319.25
5.4.400.0400.03319.20
5.4.390.0100.05019.31
5.4.380.0300.05718.59
5.4.370.0270.06018.77
5.4.360.0330.04718.51
5.4.350.0400.04318.57
5.4.340.0430.04318.73
5.4.320.0070.03612.51
5.4.310.0060.03812.51
5.4.300.0050.04212.51
5.4.290.0040.04212.50
5.4.280.0050.03612.41
5.4.270.0070.04012.40
5.4.260.0040.04312.40
5.4.250.0040.04112.41
5.4.240.0080.03812.40
5.4.230.0080.03812.40
5.4.220.0050.03712.39
5.4.210.0040.03712.39
5.4.200.0100.03312.39
5.4.190.0070.03512.39
5.4.180.0070.03512.39
5.4.170.0070.03412.40
5.4.160.0040.03912.39
5.4.150.0090.03512.39
5.4.140.0060.05312.07
5.4.130.0060.04712.06
5.4.120.0080.04612.02
5.4.110.0100.04712.02
5.4.100.0070.04112.02
5.4.90.0040.03912.01
5.4.80.0060.03912.02
5.4.70.0090.03412.01
5.4.60.0060.04112.01
5.4.50.0060.05112.01
5.4.40.0030.03912.00
5.4.30.0020.03912.00
5.4.20.0050.03612.00
5.4.10.0050.03611.98
5.4.00.0060.03911.49
5.3.290.0080.03812.80
5.3.280.0090.03712.71
5.3.270.0080.03812.72
5.3.260.0030.04312.72
5.3.250.0070.05212.72
5.3.240.0070.03612.72
5.3.230.0050.03912.71
5.3.220.0040.03812.68
5.3.210.0070.04012.68
5.3.200.0070.03412.68
5.3.190.0040.03912.68
5.3.180.0030.03912.68
5.3.170.0010.04312.67
5.3.160.0060.03612.68
5.3.150.0050.03812.68
5.3.140.0060.03612.66
5.3.130.0040.04112.66
5.3.120.0060.03812.65
5.3.110.0080.03612.66
5.3.100.0050.03712.14
5.3.90.0030.03912.13
5.3.80.0040.03712.11
5.3.70.0070.03412.12
5.3.60.0050.03612.10
5.3.50.0070.03412.04
5.3.40.0050.03612.04
5.3.30.0050.03712.00
5.3.20.0040.03611.79
5.3.10.0020.03711.75
5.3.00.0050.03611.74
5.2.170.0040.0309.23
5.2.160.0040.0329.23
5.2.150.0060.0299.23
5.2.140.0040.0309.23
5.2.130.0060.0279.19
5.2.120.0050.0289.19
5.2.110.0050.0309.19
5.2.100.0070.0259.19
5.2.90.0040.0299.19
5.2.80.0040.0309.18
5.2.70.0030.0319.19
5.2.60.0060.0289.14
5.2.50.0070.0279.11
5.2.40.0050.0289.09
5.2.30.0040.0299.06
5.2.20.0020.0309.04
5.2.10.0020.0308.95
5.2.00.0020.0318.82
5.1.60.0040.0238.10
5.1.50.0020.0268.10
5.1.40.0060.0228.08
5.1.30.0030.0268.43
5.1.20.0050.0248.45
5.1.10.0060.0248.18
5.1.00.0040.0268.18
5.0.50.0060.0256.65
5.0.40.0030.0226.50
5.0.30.0040.0296.32
5.0.20.0000.0226.29
5.0.10.0010.0226.27
5.0.00.0040.0296.25
4.4.90.0030.0144.78
4.4.80.0030.0154.76
4.4.70.0010.0174.75
4.4.60.0010.0174.75
4.4.50.0030.0154.77
4.4.40.0030.0284.71
4.4.30.0040.0144.76
4.4.20.0040.0144.84
4.4.10.0030.0154.84
4.4.00.0040.0324.76
4.3.110.0020.0214.67
4.3.100.0020.0164.66
4.3.90.0010.0164.63
4.3.80.0000.0274.58
4.3.70.0010.0204.63
4.3.60.0030.0134.62
4.3.50.0020.0154.63
4.3.40.0010.0264.53
4.3.30.0010.0173.30
4.3.20.0020.0153.28
4.3.10.0010.0173.23
4.3.00.0000.01315.68

preferences:
31.71 ms | 401 KiB | 5 Q