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(); } } } try { $Dictionary = new Dictionary(); $Dictionary["12"] = 0xDEADBEEF; echo "No Exception for \"12\"\n"; } catch (InvalidArgumentException $e) { echo "Caught Exception for \"12\"\n"; } try { $str = "12"; $Dictionary[$str] = 0xDEADBEEF; echo "No Exception for \$variable = \"12\"\n"; } catch (InvalidArgumentException $e) { echo "Caught Exception for \$variable = \"12\"\n"; } ?>

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.0000.01416.75
8.3.50.0120.00821.99
8.3.40.0110.00418.78
8.3.30.0110.00418.84
8.3.20.0040.00420.16
8.3.10.0070.00023.58
8.3.00.0040.00419.38
8.2.180.0170.00025.92
8.2.170.0090.00619.00
8.2.160.0080.00820.53
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00622.08
8.2.120.0000.00826.16
8.2.110.0030.00622.11
8.2.100.0030.00718.83
8.2.90.0030.00617.75
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0040.00417.50
8.2.50.0070.00419.48
8.2.40.0060.00317.75
8.2.30.0040.00420.70
8.2.20.0040.00417.59
8.2.10.0000.00818.02
8.2.00.0040.00418.07
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.24
8.1.230.0120.00019.15
8.1.220.0030.00617.91
8.1.210.0040.00418.77
8.1.200.0080.00017.35
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0070.00320.21
8.1.160.0040.00420.84
8.1.150.0070.00018.79
8.1.140.0000.00819.52
8.1.130.0070.00017.74
8.1.120.0000.00717.51
8.1.110.0070.00017.46
8.1.100.0040.00417.39
8.1.90.0040.00417.45
8.1.80.0050.00317.52
8.1.70.0030.00317.35
8.1.60.0050.00317.64
8.1.50.0050.00217.59
8.1.40.0080.00017.57
8.1.30.0030.00517.56
8.1.20.0000.00717.68
8.1.10.0030.00517.49
8.1.00.0070.00417.54
8.0.300.0000.00719.69
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0070.00016.83
8.0.260.0000.00717.27
8.0.250.0030.00316.89
8.0.240.0050.00316.95
8.0.230.0030.00316.89
8.0.220.0030.00316.98
8.0.210.0030.00516.89
8.0.200.0000.00716.96
8.0.190.0050.00316.86
8.0.180.0000.00716.85
8.0.170.0000.00817.01
8.0.160.0030.00617.05
8.0.150.0030.00516.85
8.0.140.0000.00716.86
8.0.130.0050.00013.34
8.0.120.0070.00016.79
8.0.110.0000.00716.83
8.0.100.0070.00016.76
8.0.90.0030.00416.86
8.0.80.0070.01116.89
8.0.70.0050.00316.91
8.0.60.0000.00816.78
8.0.50.0000.00716.71
8.0.30.0130.00717.09
8.0.20.0100.00917.40
8.0.10.0030.00516.90
8.0.00.0070.00916.77
7.4.330.0000.00416.85
7.4.320.0030.00316.65
7.4.300.0070.00016.61
7.4.290.0030.00316.52
7.4.280.0030.00616.53
7.4.270.0000.00716.64
7.4.260.0030.00316.64
7.4.250.0070.00016.61
7.4.240.0020.00516.56
7.4.230.0030.00316.56
7.4.220.0060.01216.56
7.4.210.0100.01016.73
7.4.200.0000.00716.65
7.4.160.0120.00316.64
7.4.150.0130.00617.40
7.4.140.0190.00317.86
7.4.130.0090.00816.58
7.4.120.0080.01016.69
7.4.110.0030.01416.72
7.4.100.0100.00716.65
7.4.90.0030.01316.71
7.4.80.0060.01319.39
7.4.70.0070.01016.55
7.4.60.0090.00616.62
7.4.50.0090.00616.47
7.4.40.0060.00916.28
7.4.30.0170.00016.58
7.4.00.0050.01014.87
7.3.330.0070.00013.28
7.3.320.0060.00013.32
7.3.310.0070.00016.33
7.3.300.0060.00016.37
7.3.290.0110.00516.29
7.3.280.0100.00716.29
7.3.270.0070.01017.40
7.3.260.0040.01916.27
7.3.250.0050.01216.41
7.3.240.0050.01216.46
7.3.230.0130.00916.54
7.3.210.0120.00616.51
7.3.200.0080.00916.39
7.3.190.0170.00016.50
7.3.180.0060.01016.48
7.3.170.0040.01316.55
7.3.160.0070.01616.35
7.3.120.0100.01014.98
7.3.110.0090.00614.71
7.3.100.0030.01714.82
7.3.90.0030.01015.00
7.3.80.0040.01114.88
7.3.70.0040.00814.56
7.3.60.0000.01514.50
7.3.50.0000.01314.79
7.3.40.0070.01114.86
7.3.30.0070.00714.80
7.3.20.0120.00316.77
7.3.10.0050.01116.59
7.3.00.0070.00816.64
7.2.330.0070.01116.75
7.2.320.0070.01116.70
7.2.310.0100.00616.82
7.2.300.0070.01416.71
7.2.290.0110.01016.80
7.2.250.0000.01715.03
7.2.240.0060.01215.20
7.2.230.0060.00915.39
7.2.220.0070.00715.30
7.2.210.0060.00615.08
7.2.200.0040.01115.13
7.2.190.0000.00915.19
7.2.180.0040.01115.26
7.2.170.0070.01114.99
7.2.160.0060.00615.00
7.2.150.0030.01016.90
7.2.140.0090.00616.90
7.2.130.0060.00817.05
7.2.120.0030.01117.05
7.2.110.0070.00616.92
7.2.100.0100.00717.01
7.2.90.0110.00517.06
7.2.80.0050.00616.86
7.2.70.0100.00517.02
7.2.60.0140.00616.81
7.2.50.0100.00616.95
7.2.40.0040.00716.87
7.2.30.0060.00616.99
7.2.20.0070.00816.98
7.2.10.0100.00716.89
7.2.00.0060.00816.93
7.1.330.0060.01215.94
7.1.320.0130.00315.69
7.1.310.0060.00915.75
7.1.300.0070.00715.84
7.1.290.0000.01515.68
7.1.280.0030.01015.87
7.1.270.0080.00315.74
7.1.260.0040.00815.86
7.1.250.0050.00615.59
7.1.240.0040.00415.54
7.1.230.0070.00315.93
7.1.220.0070.00415.78
7.1.210.0070.00715.80
7.1.200.0100.00315.73
7.1.190.0040.01115.68
7.1.180.0040.01115.73
7.1.170.0030.00915.73
7.1.160.0030.00515.77
7.1.150.0030.01015.86
7.1.140.0040.01115.56
7.1.130.0040.01115.67
7.1.120.0030.01015.88
7.1.110.0070.00715.83
7.1.100.0070.00716.02
7.1.90.0110.00415.91
7.1.80.0060.00315.89
7.1.70.0060.00616.63
7.1.60.0070.00917.58
7.1.50.0050.01116.33
7.1.40.0090.00315.71
7.1.30.0040.00915.84
7.1.20.0040.00416.03
7.1.10.0030.00915.56
7.1.00.0000.04419.07
7.0.330.0040.00415.51
7.0.320.0000.01115.41
7.0.310.0060.00315.06
7.0.300.0060.00615.37
7.0.290.0030.00715.19
7.0.280.0000.01615.15
7.0.270.0070.01115.49
7.0.260.0030.01215.48
7.0.250.0070.00715.60
7.0.240.0110.00315.55
7.0.230.0100.00715.63
7.0.220.0060.00615.52
7.0.210.0100.00315.54
7.0.200.0050.00516.02
7.0.190.0030.01015.36
7.0.180.0110.00315.47
7.0.170.0100.00615.48
7.0.160.0040.01115.43
7.0.150.0000.01515.43
7.0.140.0060.00615.29
7.0.130.0040.01115.57
7.0.120.0060.00315.64
7.0.110.0060.00615.17
7.0.100.0040.00715.58
7.0.90.0070.01015.54
7.0.80.0000.01415.48
7.0.70.0030.01015.47
7.0.60.0060.02317.56
7.0.50.0070.04416.70
7.0.40.0040.02716.89
7.0.30.0230.03116.96
7.0.20.0150.02616.82
7.0.10.0070.04616.93
7.0.00.0060.02216.89
5.6.400.0100.00614.27
5.6.390.0030.01014.45
5.6.380.0000.01414.45
5.6.370.0000.01114.72
5.6.360.0080.00314.11
5.6.350.0000.00914.60
5.6.340.0000.01614.25
5.6.330.0100.00314.30
5.6.320.0000.01814.77
5.6.310.0060.00914.49
5.6.300.0030.00614.47
5.6.290.0070.00714.36
5.6.280.0020.02217.72
5.6.270.0100.00314.71
5.6.260.0040.00914.41
5.6.250.0030.01114.48
5.6.240.0080.00314.70
5.6.230.0040.00714.63
5.6.220.0000.01114.29
5.6.210.0070.04017.53
5.6.200.0100.03716.15
5.6.190.0020.03517.46
5.6.180.0270.03717.46
5.6.170.0130.02317.56
5.6.160.0030.03517.52
5.6.150.0020.04916.33
5.6.140.0110.01716.44
5.6.130.0030.03316.21
5.6.120.0020.02917.59
5.6.110.0120.04017.64
5.6.100.0020.04717.62
5.6.90.0070.03817.71
5.6.80.0080.01817.41
5.6.70.0000.01414.56
5.6.60.0030.01014.37
5.6.50.0070.00714.34
5.6.40.0070.00414.47
5.6.30.0000.00814.30
5.6.20.0050.00514.11
5.6.10.0040.00914.13
5.6.00.0060.00614.34
5.5.380.0070.00614.44
5.5.370.0090.00614.39
5.5.360.0000.01114.13
5.5.350.0180.03317.38
5.5.340.0090.03916.19
5.5.330.0050.04317.40
5.5.320.0070.04217.64
5.5.310.0100.02317.30
5.5.300.0110.04016.31
5.5.290.0090.02516.27
5.5.280.0120.03517.59
5.5.270.0050.04617.59
5.5.260.0050.02217.60
5.5.250.0080.04617.42
5.5.240.0110.04017.33
5.5.230.0090.00014.43
5.5.220.0100.00714.04
5.5.210.0000.00914.26
5.5.200.0050.00514.07
5.5.190.0030.00614.35
5.5.180.0030.01014.37
5.5.170.0000.01314.35
5.5.160.0030.01014.13
5.5.150.0070.00714.36
5.5.140.0030.00714.27
5.5.130.0050.00314.16
5.5.120.0070.00713.91
5.5.110.0030.00714.24
5.5.100.0030.00914.46
5.5.90.0030.01014.45
5.5.80.0040.00414.55
5.5.70.0030.00614.11
5.5.60.0080.00514.26
5.5.50.0040.01113.99
5.5.40.0000.01014.24
5.5.30.0040.01214.02
5.5.20.0030.01314.09
5.5.10.0100.00714.37
5.5.00.0040.00414.42

preferences:
82.48 ms | 401 KiB | 5 Q