3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements ArrayAccess { public function offsetGet(mixed $offset) { } public function offsetExists(mixed $offset) { } public function offsetSet(mixed $offset, mixed $value) { } public function offsetUnset(mixed $offset) { } } class Foo81 implements ArrayAccess { #[\ReturnTypeWillChange] public function offsetGet(mixed $offset) { } #[\ReturnTypeWillChange] public function offsetExists(mixed $offset) { } #[\ReturnTypeWillChange] public function offsetSet(mixed $offset, mixed $value) { } #[\ReturnTypeWillChange] public function offsetUnset(mixed $offset) { } } class Foo81ForReal implements ArrayAccess { public function offsetGet(mixed $offset): string { } public function offsetExists(mixed $offset): bool { } public function offsetSet(mixed $offset, mixed $value): void { } public function offsetUnset(mixed $offset): void { } }

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.4.20.0070.01120.64
8.4.10.0090.00023.64
8.3.140.0070.00017.05
8.3.130.0060.00318.69
8.3.120.0110.00719.05
8.3.110.0040.00420.94
8.3.100.0090.00024.06
8.3.90.0090.00626.77
8.3.80.0060.00316.63
8.3.70.0120.00316.63
8.3.60.0120.00318.18
8.3.50.0100.00720.09
8.3.40.0170.00318.82
8.3.30.0150.00019.15
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.260.0030.00516.63
8.2.250.0080.00018.32
8.2.240.0000.00917.14
8.2.230.0070.00022.58
8.2.220.0030.00637.54
8.2.210.0110.00426.77
8.2.200.0070.00316.38
8.2.190.0160.00616.63
8.2.180.0110.00725.92
8.2.170.0090.00918.96
8.2.160.0100.00322.96
8.2.150.0050.00525.66
8.2.140.0070.00024.66
8.2.130.0140.00026.16
8.2.120.0040.00419.28
8.2.110.0100.00020.99
8.2.100.0040.00819.45
8.2.90.0030.00517.63
8.2.80.0030.00519.53
8.2.70.0030.00617.80
8.2.60.0040.00418.03
8.2.50.0080.00018.04
8.2.40.0040.00419.22
8.2.30.0040.00417.62
8.2.20.0050.00220.34
8.2.10.0000.00717.98
8.2.00.0060.00319.11
8.1.310.0120.00618.38
8.1.300.0070.00717.68
8.1.290.0030.00630.84
8.1.280.0110.00425.92
8.1.270.0000.00923.99
8.1.260.0150.00626.35
8.1.250.0030.00528.09
8.1.240.0030.00718.96
8.1.230.0110.00020.96
8.1.220.0050.00317.74
8.1.210.0080.00018.97
8.1.200.0030.00517.35
8.1.190.0050.00317.29
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0070.00018.72
8.1.150.0000.00718.48
8.1.140.0000.00817.30
8.1.130.0000.00717.30
8.1.120.0040.00417.37
8.1.110.0030.00717.22
8.1.100.0000.00717.43
8.1.90.0000.01017.41
8.1.80.0040.00417.32
8.1.70.0100.00217.32
8.1.60.0160.00217.40
8.1.50.0140.00717.47
8.1.40.0140.00717.47
8.1.30.0130.00817.43
8.1.20.0130.00617.46
8.1.10.0160.00517.36
8.1.00.0120.00417.32
8.0.300.0000.00719.64
8.0.290.0000.00816.75
8.0.280.0030.00318.29
8.0.270.0060.00317.87
8.0.260.0000.00616.76
8.0.250.0000.00816.79
8.0.240.0030.00316.86
8.0.230.0000.00716.91
8.0.220.0080.00016.88
8.0.210.0000.00816.85
8.0.200.0120.00416.90
8.0.190.0130.00416.85
8.0.180.0110.00616.81
8.0.170.0090.00816.80
8.0.160.0100.00716.85
8.0.150.0120.00516.65
8.0.140.0110.00716.79
8.0.130.0110.00716.68
8.0.120.0120.00616.76
8.0.110.0100.00616.81
8.0.100.0090.00716.70
8.0.90.0120.00716.78
8.0.80.0090.00716.73
8.0.70.0070.00416.82
8.0.60.0060.00616.79
8.0.50.0080.00716.74
8.0.30.0160.00016.75
8.0.20.0080.00716.85
8.0.10.0120.00416.80
7.4.330.0000.00515.55
7.4.320.0000.00616.46
7.4.300.0100.00416.31
7.4.290.0110.00716.43
7.4.280.0130.00516.46
7.4.270.0140.00516.55
7.4.260.0080.01316.50
7.4.250.0130.00316.33
7.4.240.0070.00516.46
7.4.230.0090.00316.36
7.4.220.0110.00316.41
7.4.210.0130.00316.42
7.4.200.0140.00216.51
7.4.190.0130.00416.50
7.4.180.0130.00316.50
7.4.160.0130.00216.40
7.4.150.0070.00316.19
7.4.140.0050.00516.21
7.4.130.0090.00516.32
7.4.120.0070.00516.29
7.4.110.0090.00316.31
7.4.100.0060.00516.29
7.4.90.0090.00216.29
7.4.80.0090.00516.23
7.4.70.0060.00816.25
7.4.60.0090.00616.36
7.4.50.0120.00216.14
7.4.40.0120.00316.25
7.4.30.0090.00216.18
7.4.20.0050.00416.22
7.4.10.0020.00616.31
7.4.00.0030.00516.30

preferences:
33.67 ms | 403 KiB | 5 Q