3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayData = new class implements \ArrayAccess { public function offsetExists($offset) { echo "offsetExists\n"; } public function offsetGet($offset) { echo "offsetGet\n"; } public function offsetSet($offset, $value) { } public function offsetUnset($offset) { } }; echo "arrayData - isset:\n"; isset($arrayData['foo']) ? NULL : NULL; echo "arrayData - null coalescing operator:\n"; $arrayData['foo'] ?? NULL; $fixedData = new class extends \SplFixedArray { public function offsetExists($offset) { echo "offsetExists\n"; } public function offsetGet($offset) { echo "offsetGet\n"; } public function offsetSet($offset, $value) { } public function offsetUnset($offset) { } }; echo "fixedData - isset:\n"; isset($fixedData['foo']) ? NULL : NULL; echo "fixedData - null coalescing operator:\n"; $fixedData['foo'] ?? NULL;

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.1.130.0000.00717.54
8.1.120.0030.00517.49
8.1.110.0050.00317.48
8.1.100.0070.00017.42
8.1.90.0030.00617.36
8.1.80.0000.00717.48
8.1.70.0030.00317.47
8.1.60.0000.00817.60
8.1.50.0040.00417.43
8.1.40.0000.00917.40
8.1.30.0060.00317.66
8.1.20.0000.00817.71
8.1.10.0070.00017.52
8.1.00.0000.00717.52
8.0.260.0000.00716.73
8.0.250.0030.00316.97
8.0.240.0000.00816.97
8.0.230.0030.00616.84
8.0.220.0030.00316.88
8.0.210.0070.00016.78
8.0.200.0000.00716.99
8.0.190.0090.00016.91
8.0.180.0040.00416.84
8.0.170.0000.00716.84
8.0.160.0000.00716.93
8.0.150.0000.00716.84
8.0.140.0000.00716.91
8.0.130.0060.00013.34
8.0.120.0040.00416.86
8.0.110.0020.00516.77
8.0.100.0040.00416.78
8.0.90.0000.00816.97
8.0.80.0090.00616.88
8.0.70.0040.00416.89
8.0.60.0040.00416.78
8.0.50.0040.00416.71
8.0.30.0090.01017.21
8.0.20.0100.00817.40
8.0.10.0040.00416.99
8.0.00.0140.00316.91
7.4.330.0000.00415.55
7.4.320.0030.00316.53
7.4.300.0060.00016.57
7.4.290.0070.00016.57
7.4.280.0000.00816.61
7.4.270.0000.00816.55
7.4.260.0000.00716.49
7.4.250.0070.00016.47
7.4.240.0030.00316.43
7.4.230.0000.00716.45
7.4.220.0100.00716.57
7.4.210.0180.00316.73
7.4.200.0030.00316.60
7.4.160.0050.01116.63
7.4.150.0120.00417.40
7.4.140.0110.01017.86
7.4.130.0060.01316.49
7.4.120.0130.00716.56
7.4.110.0070.01116.40
7.4.100.0100.01016.47
7.4.90.0100.00716.46
7.4.80.0130.01019.39
7.4.70.0150.00816.46
7.4.60.0100.00716.55
7.4.50.0040.01116.42
7.4.40.0130.01016.58
7.4.30.0110.00616.55
7.4.00.0090.00615.20
7.3.330.0030.00313.33
7.3.320.0030.00313.36
7.3.310.0030.00316.41
7.3.300.0030.00316.39
7.3.290.0100.00416.35
7.3.280.0100.00916.42
7.3.270.0070.01517.40
7.3.260.0090.01216.49
7.3.250.0070.01116.41
7.3.240.0120.00716.43
7.3.230.0040.01616.35
7.3.210.0060.00916.41
7.3.200.0130.00416.34
7.3.190.0080.00816.45
7.3.180.0060.00916.54
7.3.170.0160.00016.32
7.3.160.0160.00616.49
7.3.10.0000.00916.54
7.3.00.0030.01016.54
7.2.330.0130.00716.66
7.2.320.0130.00316.73
7.2.310.0100.00716.48
7.2.300.0060.01216.77
7.2.290.0050.01116.41
7.2.130.0030.01016.47
7.2.120.0040.01116.58
7.2.110.0140.00516.50
7.2.100.0100.00016.97
7.2.90.0080.00816.71
7.2.80.0130.00316.95
7.2.70.0030.00916.92
7.2.60.0030.01016.62
7.2.50.0070.00716.73
7.2.40.0050.00516.95
7.2.30.0030.00616.82
7.2.20.0040.00816.42
7.2.10.0030.01016.63
7.2.00.0060.00818.19
7.1.250.0040.00815.45
7.1.200.0070.00715.77
7.1.70.0030.01317.22
7.1.60.0030.00917.19
7.1.50.0040.00716.97
7.1.40.0030.01216.91
7.1.30.0130.00016.91
7.1.20.0060.00616.91
7.1.10.0000.00816.91
7.1.00.0060.00916.91
7.0.200.0040.00416.91
7.0.190.0050.00216.91
7.0.180.0000.00816.91
7.0.170.0060.00316.91
7.0.160.0000.00716.91
7.0.150.0000.00916.91
7.0.140.0050.00216.91
7.0.130.0060.00916.91
7.0.120.0050.00316.91
7.0.110.0070.00716.91
7.0.100.0030.01316.91
7.0.90.0000.01116.91
7.0.80.0120.00016.91
7.0.70.0000.01216.91
7.0.60.0030.00516.91
7.0.50.0030.00616.91
7.0.40.0050.00216.91
7.0.30.0040.00416.91
7.0.20.0000.00816.91
7.0.10.0040.00416.91
7.0.00.0030.00716.91
5.6.300.0130.04420.83
5.6.290.0000.04320.99
5.6.280.0070.07920.91
5.6.270.0030.08320.86
5.6.260.0070.04420.97
5.6.250.0040.04221.03
5.6.240.0000.04520.95
5.6.230.0070.04520.98
5.6.220.0300.03020.82
5.6.210.0100.03320.80
5.6.200.0100.04020.99
5.6.190.0070.04020.90
5.6.180.0110.03520.95
5.6.170.0000.05220.81
5.6.160.0030.04320.78
5.6.150.0030.04020.92
5.6.140.0100.04420.88
5.6.130.0000.04320.81
5.6.120.0030.05320.79
5.6.110.0030.06820.85
5.6.100.0000.04820.84
5.6.90.0030.03920.95
5.6.80.0070.03620.24
5.6.70.0000.06220.23
5.6.60.0000.04820.23
5.6.50.0070.03420.20
5.6.40.0030.03720.31
5.6.30.0070.05920.31
5.6.20.0070.03620.13
5.6.10.0060.03420.33
5.6.00.0000.04920.32
5.5.380.0030.08417.62
5.5.370.0000.04717.63
5.5.360.0030.04217.62
5.5.350.0160.04217.66
5.5.340.0030.03918.13
5.5.330.0070.03618.06
5.5.320.0100.03218.00
5.5.310.0030.03718.13
5.5.300.0000.04818.11
5.5.290.0030.05918.14
5.5.280.0030.04418.13
5.5.270.0060.05818.12
5.5.260.0000.05718.13
5.5.250.0030.03817.87
5.5.240.0030.04217.51
5.5.230.0000.04317.41
5.5.220.0030.04017.12
5.5.210.0030.04217.50
5.5.200.0060.03817.41
5.5.190.0000.07517.39
5.5.180.0000.04517.36
5.5.160.0070.03217.45
5.5.150.0070.04617.35
5.5.140.0030.04017.44
5.5.130.0070.03917.45
5.5.120.0040.03917.49
5.5.110.0000.06017.39
5.5.100.0000.04117.35
5.5.90.0070.03417.28
5.5.80.0000.08317.43
5.5.70.0000.05717.27
5.5.60.0070.05417.39
5.5.50.0060.03417.32
5.5.40.0030.07417.30
5.5.30.0030.04117.07
5.5.20.0070.09117.38
5.5.10.0000.05317.32
5.5.00.0130.04617.24
5.4.450.0030.04219.31
5.4.440.0070.03919.44
5.4.430.0060.03919.43
5.4.420.0040.03919.27
5.4.410.0030.04219.17
5.4.400.0030.05018.98
5.4.390.0000.04218.92
5.4.380.0060.04218.95
5.4.370.0030.04019.07
5.4.360.0030.04318.94
5.4.350.0030.04518.95
5.4.340.0000.04019.08
5.4.320.0000.05519.07
5.4.310.0030.03819.16
5.4.300.0030.04018.92
5.4.290.0030.03819.07
5.4.280.0060.03518.96
5.4.270.0030.06719.17
5.4.260.0070.03419.17
5.4.250.0030.03818.96
5.4.240.0060.04519.13
5.4.230.0030.04718.94
5.4.220.0000.04219.17
5.4.210.0000.06919.11
5.4.200.0000.07319.07
5.4.190.0000.04019.06
5.4.180.0030.08019.20
5.4.170.0070.03618.97
5.4.160.0000.09019.05
5.4.150.0070.07819.18
5.4.140.0030.04316.91
5.4.130.0100.04016.91
5.4.120.0030.03316.91
5.4.110.0060.03116.91
5.4.100.0000.07716.91
5.4.90.0060.04116.91
5.4.80.0030.03516.91
5.4.70.0160.03316.91
5.4.60.0000.03816.91
5.4.50.0030.06816.91
5.4.40.0060.03916.91
5.4.30.0030.03716.91
5.4.20.0060.03616.91
5.4.10.0030.03616.91
5.4.00.0060.03816.91
5.3.290.0070.08416.91
5.3.280.0030.04516.91
5.3.270.0030.06616.91
5.3.260.0000.04516.91
5.3.250.0070.03216.91
5.3.240.0030.03816.91
5.3.230.0000.04216.91
5.3.220.0130.03916.91
5.3.210.0030.06116.91
5.3.200.0060.03216.91
5.3.190.0000.07616.91
5.3.180.0040.03916.91
5.3.170.0070.03216.91
5.3.160.0030.04416.91
5.3.150.0100.06616.91
5.3.140.0100.03116.91
5.3.130.0070.04316.91
5.3.120.0040.03916.91
5.3.110.0000.05016.91
5.3.100.0030.06216.91
5.3.90.0070.05616.91
5.3.80.0130.03216.91
5.3.70.0040.03516.91
5.3.60.0030.04216.91
5.3.50.0070.03316.91
5.3.40.0030.07816.91
5.3.30.0030.04016.91
5.3.20.0030.07616.91
5.3.10.0030.07716.91
5.3.00.0070.07316.91
5.2.170.0000.03616.91
5.2.160.0000.03216.91
5.2.150.0100.03116.91
5.2.140.0000.03116.91
5.2.130.0070.04816.91
5.2.120.0070.06016.91
5.2.110.0000.03516.91
5.2.100.0030.03016.91
5.2.90.0000.03016.91
5.2.80.0000.03716.91
5.2.70.0000.05016.91
5.2.60.0100.04016.91
5.2.50.0030.04616.91
5.2.40.0000.03216.91
5.2.30.0130.04016.91
5.2.20.0000.03216.91
5.2.10.0060.03216.91
5.2.00.0040.02916.91
5.1.60.0000.03616.91
5.1.50.0000.02916.91
5.1.40.0070.05016.91
5.1.30.0070.04016.91
5.1.20.0030.02916.91
5.1.10.0030.02316.91
5.1.00.0000.02616.91
5.0.50.0000.02216.91
5.0.40.0000.02116.91
5.0.30.0070.05716.91
5.0.20.0060.04216.91
5.0.10.0060.02516.91
5.0.00.0000.03516.91
4.4.90.0070.01716.91
4.4.80.0000.01616.91
4.4.70.0000.01816.91
4.4.60.0030.01316.91
4.4.50.0030.01416.91
4.4.40.0030.03116.91
4.4.30.0070.03016.91
4.4.20.0000.01716.91
4.4.10.0000.01616.91
4.4.00.0030.02316.91
4.3.110.0030.02016.91
4.3.100.0030.03516.91
4.3.90.0000.01716.91
4.3.80.0000.05616.91
4.3.70.0070.03316.91
4.3.60.0060.03216.91
4.3.50.0030.03416.91
4.3.40.0000.05816.91
4.3.30.0060.01216.91
4.3.20.0030.01716.91
4.3.10.0070.01516.91
4.3.00.0090.02816.91

preferences:
13.21 ms | 406 KiB | 5 Q