3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dictionary implements ArrayAccess { function offsetExists($offset) {} function offsetGet($offset) {} function offsetUnset($offset) {} function offsetSet($offset, $value) { if (!is_string($offset)) { throw new InvalidArgumentException(); } } } $Dictionary = new Dictionary(); $Dictionary["12"] = 0xDEADBEEF; // int(12) $str = "12"; $Dictionary[$str] = 0xDEADBEEF; // string(2) "12" ?>

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.0110.00616.50
8.3.50.0110.01121.99
8.3.40.0100.01018.98
8.3.30.0120.00618.73
8.3.20.0080.00020.16
8.3.10.0040.00423.70
8.3.00.0000.00819.38
8.2.180.0120.00316.75
8.2.170.0100.01022.96
8.2.160.0100.00320.30
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0040.00420.97
8.2.110.0050.00522.05
8.2.100.0060.00617.88
8.2.90.0060.00319.48
8.2.80.0040.00418.04
8.2.70.0040.00417.80
8.2.60.0060.00318.04
8.2.50.0040.00418.10
8.2.40.0040.00420.61
8.2.30.0000.00720.62
8.2.20.0040.00417.73
8.2.10.0070.00018.01
8.2.00.0050.00218.04
8.1.280.0190.00025.92
8.1.270.0080.00023.89
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00623.92
8.1.230.0070.00318.99
8.1.220.0000.00917.74
8.1.210.0000.00820.90
8.1.200.0070.00317.35
8.1.190.0000.00817.25
8.1.180.0030.00518.10
8.1.170.0000.00918.46
8.1.160.0040.00420.74
8.1.150.0000.00718.82
8.1.140.0030.00519.62
8.1.130.0030.00317.57
8.1.120.0000.00717.41
8.1.110.0070.00017.46
8.1.100.0030.00517.51
8.1.90.0000.00817.46
8.1.80.0000.00817.43
8.1.70.0000.00717.34
8.1.60.0000.00717.55
8.1.50.0000.00817.43
8.1.40.0000.00917.51
8.1.30.0000.00817.63
8.1.20.0030.00617.70
8.1.10.0060.00317.53
8.1.00.0080.00317.50
8.0.300.0040.00419.73
8.0.290.0070.00016.75
8.0.280.0000.00718.46
8.0.270.0030.00317.13
8.0.260.0030.00317.27
8.0.250.0030.00316.93
8.0.240.0060.00316.98
8.0.230.0000.00716.95
8.0.220.0040.00416.80
8.0.210.0040.00416.93
8.0.200.0000.00616.96
8.0.190.0000.00816.95
8.0.180.0040.00416.83
8.0.170.0040.00416.82
8.0.160.0070.00016.83
8.0.150.0030.00616.85
8.0.140.0030.00516.75
8.0.130.0060.00013.29
8.0.120.0030.00516.85
8.0.110.0040.00416.80
8.0.100.0070.00016.70
8.0.90.0000.00716.73
8.0.80.0130.00316.91
8.0.70.0000.00716.83
8.0.60.0050.00216.96
8.0.50.0000.00816.70
8.0.30.0080.01117.19
8.0.20.0140.00817.40
8.0.10.0080.00017.04
8.0.00.0080.00916.64
7.4.330.0040.00016.75
7.4.320.0000.00716.48
7.4.300.0000.00716.66
7.4.290.0070.00016.63
7.4.280.0040.00416.63
7.4.270.0050.00316.37
7.4.260.0030.00316.57
7.4.250.0040.00416.56
7.4.240.0020.00516.56
7.4.230.0030.00316.41
7.4.220.0140.00616.72
7.4.210.0060.01216.66
7.4.200.0000.00816.59
7.4.160.0070.01316.41
7.4.150.0190.00617.40
7.4.140.0120.01117.86
7.4.130.0100.01016.47
7.4.120.0090.00916.55
7.4.110.0140.00316.45
7.4.100.0130.01016.56
7.4.90.0070.01016.27
7.4.80.0130.00619.39
7.4.70.0110.00716.66
7.4.60.0090.00716.52
7.4.50.0030.01316.63
7.4.40.0040.01116.46
7.4.30.0110.00616.72
7.4.00.0030.01215.03
7.3.330.0000.00713.33
7.3.320.0000.00513.18
7.3.310.0050.00216.16
7.3.300.0070.00016.20
7.3.290.0030.00316.19
7.3.280.0110.00616.33
7.3.270.0160.01217.40
7.3.260.0100.00716.54
7.3.250.0090.00916.48
7.3.240.0080.01416.41
7.3.230.0100.00716.39
7.3.210.0130.00316.36
7.3.200.0130.01016.36
7.3.190.0130.00716.32
7.3.180.0100.00616.36
7.3.170.0070.01016.32
7.3.160.0120.00316.28
7.2.330.0070.01016.50
7.2.320.0190.00316.72
7.2.310.0060.00916.51
7.2.300.0130.01016.69
7.2.290.0110.00716.73
7.2.60.0110.01117.00
7.2.00.0030.01419.14
7.1.200.0060.00615.98
7.1.100.0060.00617.94
7.1.70.0070.00017.03
7.1.60.0110.01119.50
7.1.50.0060.00616.90
7.1.00.0000.07722.33
7.0.200.0040.00416.73
7.0.60.0070.03719.88
7.0.50.0070.04317.85
7.0.40.0170.07020.41
7.0.30.0470.04720.08
7.0.20.0330.08020.27
7.0.10.0030.09320.06
7.0.00.0100.08020.09
5.6.280.0000.03321.09
5.6.210.0170.07320.61
5.6.200.0070.08018.24
5.6.190.0030.06020.63
5.6.180.0300.04020.63
5.6.170.0170.05020.55
5.6.160.0030.07720.57
5.6.150.0070.04018.27
5.6.140.0070.05718.28
5.6.130.0000.07718.20
5.6.120.0070.08320.91
5.6.110.0030.08320.89
5.6.100.0100.05320.88
5.6.90.0070.05321.02
5.6.80.0070.04020.39
5.5.350.0300.06720.45
5.5.340.0070.07317.98
5.5.330.0100.08720.40
5.5.320.0070.05020.35
5.5.310.0270.07320.30
5.5.300.0100.07718.01
5.5.290.0070.08317.92
5.5.280.0070.05020.97
5.5.270.0070.06720.97
5.5.260.0030.04720.79
5.5.250.0070.06720.55
5.5.240.0230.07320.07

preferences:
33.71 ms | 401 KiB | 5 Q