3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ArrayAccessObject implements ArrayAccess { public function offsetSet($offset, $value){} public function offsetUnset($offset){} public function offsetExists($offset){} public function offsetGet($offset){ echo gettype($offset) . "\n"; } } $array = ['a', 'b', 'c']; $object = new ArrayAccessObject(); $string = '1'; $object[1]; // 'integer' $object['1']; // 'integer' <-- should be string $object[1.0]; // 'double' $object[true]; // 'boolean' $object[$string]; // 'string' $object[$object]; // 'object' $object[$array]; // 'array'

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.0040.01816.88
8.3.50.0070.01016.16
8.3.40.0000.01418.71
8.3.30.0120.00318.84
8.3.20.0040.00420.25
8.3.10.0040.00421.90
8.3.00.0040.00417.78
8.2.180.0090.01225.92
8.2.170.0110.00722.96
8.2.160.0070.00720.58
8.2.150.0000.00725.66
8.2.140.0090.00624.66
8.2.130.0080.00022.12
8.2.120.0030.00526.35
8.2.110.0080.00019.08
8.2.100.0080.00317.84
8.2.90.0000.00817.84
8.2.80.0030.00517.97
8.2.70.0090.00017.50
8.2.60.0040.00418.16
8.2.50.0050.00517.50
8.2.40.0000.01017.75
8.2.30.0040.00420.97
8.2.20.0040.00418.19
8.2.10.0040.00418.18
8.2.00.0000.00818.00
8.1.280.0070.00725.92
8.1.270.0080.00023.84
8.1.260.0050.00226.35
8.1.250.0000.00828.09
8.1.240.0030.00823.83
8.1.230.0040.00720.95
8.1.220.0060.00317.76
8.1.210.0080.00019.11
8.1.200.0000.01017.35
8.1.190.0030.00617.53
8.1.180.0040.00418.10
8.1.170.0060.00318.34
8.1.160.0000.00718.90
8.1.150.0080.00020.56
8.1.140.0040.00419.52
8.1.130.0000.00718.88
8.1.120.0050.00317.38
8.1.110.0050.00317.42
8.1.100.0000.00817.44
8.1.90.0000.00917.50
8.1.80.0000.00717.35
8.1.70.0030.00317.51
8.1.60.0000.00817.57
8.1.50.0060.00317.49
8.1.40.0080.00017.57
8.1.30.0000.00817.66
8.1.20.0000.00817.57
8.1.10.0080.00017.56
8.1.00.0000.00717.38
8.0.300.0040.00419.82
8.0.290.0080.00016.63
8.0.280.0000.00718.36
8.0.270.0000.00716.71
8.0.260.0000.00616.81
8.0.250.0030.00316.95
8.0.240.0000.00816.98
8.0.230.0060.00316.93
8.0.220.0000.00716.86
8.0.210.0050.00316.79
8.0.200.0030.00316.94
8.0.190.0110.00016.89
8.0.180.0000.01016.89
8.0.170.0070.00016.88
8.0.160.0050.00216.98
8.0.150.0000.00716.90
8.0.140.0050.00316.83
8.0.130.0000.00513.36
8.0.120.0000.00816.83
8.0.110.0000.00716.78
8.0.100.0040.00416.85
8.0.90.0030.00516.91
8.0.80.0130.00316.82
8.0.70.0070.00016.82
8.0.60.0050.00216.67
8.0.50.0000.00816.68
8.0.30.0120.00817.01
8.0.20.0090.01017.40
8.0.10.0050.00317.00
8.0.00.0100.00716.61
7.4.330.0050.00015.55
7.4.320.0040.00416.42
7.4.300.0000.00616.50
7.4.290.0030.00316.48
7.4.280.0060.00316.62
7.4.270.0070.00016.65
7.4.260.0000.00613.27
7.4.250.0070.00016.46
7.4.240.0000.00716.49
7.4.230.0070.00016.70
7.4.220.0030.01416.48
7.4.210.0060.00816.67
7.4.200.0030.00316.70
7.4.160.0120.00616.58
7.4.150.0170.00017.40
7.4.140.0070.01217.86
7.4.130.0040.01516.57
7.4.120.0120.00716.48
7.4.110.0090.00916.47
7.4.100.0110.01116.65
7.4.90.0160.00816.57
7.4.80.0100.01419.39
7.4.70.0030.01216.46
7.4.60.0060.00916.61
7.4.50.0030.01016.48
7.4.40.0100.01016.57
7.4.30.0060.00916.54
7.4.00.0090.00614.97
7.3.330.0060.00013.35
7.3.320.0030.00313.31
7.3.310.0000.00716.41
7.3.300.0000.00616.31
7.3.290.0120.00616.30
7.3.280.0100.00716.32
7.3.270.0100.00717.40
7.3.260.0050.01316.38
7.3.250.0090.01016.39
7.3.240.0050.01316.36
7.3.230.0090.00916.38
7.3.210.0130.00316.59
7.3.200.0030.01416.39
7.3.190.0040.01316.50
7.3.180.0070.01016.36
7.3.170.0140.00316.32
7.3.160.0140.00716.36
7.3.10.0120.00516.29
7.3.00.0090.00516.32
7.2.330.0060.01216.91
7.2.320.0090.00916.79
7.2.310.0130.01016.36
7.2.300.0110.01416.66
7.2.290.0030.01316.87
7.2.130.0090.01016.63
7.2.120.0060.00916.69
7.2.110.0090.00816.57
7.2.100.0100.00716.61
7.2.90.0100.00816.97
7.2.80.0070.00816.84
7.2.70.0110.00616.56
7.2.60.0070.00616.75
7.2.50.0060.01016.72
7.2.40.0110.00516.66
7.2.30.0090.00616.55
7.2.20.0040.01016.73
7.2.10.0100.00516.41
7.2.00.0090.00616.96
7.1.250.0030.01115.51
7.1.200.0030.01015.78
7.1.70.2930.01015.04
7.1.60.2730.01333.31
7.1.50.3330.02032.87
7.1.40.2900.01332.63
7.1.30.3670.01332.60
7.1.20.2630.01732.60
7.1.10.2900.01714.55
7.1.00.2800.01314.84
7.0.200.3300.01015.03
7.0.190.3400.00714.88
7.0.180.2730.01714.50
7.0.170.3600.01314.28
7.0.160.3470.02014.27
7.0.150.2170.01314.11
7.0.140.2870.01714.40
7.0.130.2770.00714.58
7.0.120.2630.00714.48
7.0.110.2800.01714.39
7.0.100.2730.01714.28
7.0.90.2730.01314.38
7.0.80.3130.01014.58
7.0.70.2930.00714.38
7.0.60.3270.02014.30
7.0.50.3100.01714.46
7.0.40.3070.01314.82
7.0.30.3570.00314.84
7.0.20.3630.01314.60
7.0.10.4100.01314.49
7.0.00.3330.02314.49

preferences:
45.86 ms | 401 KiB | 5 Q