3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ 'abc' => 46, 'def' => 134, 'xyz' => 34, //'qwe' => 39, ]; $array2 = [ 'abc' => 46, 'def' => 134, 'xyz' => 34, 'qwe' => 39, ]; function allKeysFoundInBothArrays(array $array1, array $array2): bool { foreach ($array1 as $key => $notUsed) { echo "checking $key in \$array2\n"; if (!key_exists($key, $array2)) { return false; } unset($array2[$key]); } foreach ($array2 as $key => $notUsed) { echo "checking $key in \$array1\n"; if (!key_exists($key, $array1)) { return false; } } return true; } var_export(allKeysFoundInBothArrays($array1, $array2));

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.5.00.0130.01020.13
8.4.150.0030.00014.05
8.4.140.0100.01417.38
8.4.130.0130.00817.90
8.4.120.0150.00520.92
8.4.110.0110.00822.29
8.4.100.0150.00617.71
8.4.90.0110.00917.74
8.4.80.0130.00717.75
8.4.70.0110.00818.12
8.4.60.0110.01118.68
8.4.50.0120.00918.61
8.4.40.0060.01319.70
8.4.30.0120.00620.43
8.4.20.0060.00318.05
8.4.10.0120.00923.85
8.3.280.0120.00818.55
8.3.270.0170.00716.42
8.3.260.0070.00216.64
8.3.250.0090.01018.89
8.3.240.0140.00916.64
8.3.230.0130.00616.83
8.3.220.0110.00716.50
8.3.210.0090.01018.38
8.3.200.0040.00416.59
8.3.190.0050.00317.37
8.3.180.0120.00617.38
8.3.170.0060.01220.80
8.3.160.0140.00417.26
8.3.150.0110.00417.33
8.3.140.0080.00019.16
8.3.130.0040.00418.61
8.3.120.0060.00320.97
8.3.110.0090.00020.94
8.3.100.0040.00418.25
8.3.90.0040.00416.51
8.3.80.0060.00316.35
8.3.70.0100.01016.63
8.3.60.0150.00016.63
8.3.50.0100.00320.35
8.3.40.0070.00722.23
8.3.30.0110.00418.84
8.3.20.0030.00924.18
8.3.10.0060.00324.66
8.3.00.0000.00726.16
8.2.290.0050.00419.25
8.2.280.0110.00618.60
8.2.270.0070.00716.88
8.2.260.0030.00620.95
8.2.250.0150.00418.34
8.2.240.0040.00817.13
8.2.230.0000.00822.58
8.2.220.0090.00624.06
8.2.210.0080.00026.77
8.2.200.0060.00318.16
8.2.190.0090.00618.16
8.2.180.0040.01125.92
8.2.170.0030.01122.96
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00326.16
8.2.110.0060.00320.54
8.2.100.0070.00417.78
8.2.90.0040.00419.11
8.2.80.0050.00317.97
8.2.70.0060.00317.63
8.2.60.0000.00818.03
8.2.50.0000.00818.07
8.2.40.0040.00418.16
8.2.30.0040.00418.14
8.2.20.0000.00719.20
8.2.10.0030.00618.02
8.2.00.0000.00819.20
8.1.330.0110.00916.18
8.1.320.0140.00516.32
8.1.310.0150.00318.34
8.1.300.0090.00018.70
8.1.290.0090.00018.88
8.1.280.0140.00425.92
8.1.270.0090.00022.12
8.1.260.0060.00926.35
8.1.250.0080.00028.09
8.1.240.0080.00421.88
8.1.230.0040.00720.82
8.1.220.0040.00417.78
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.22
8.1.180.0030.00518.10
8.1.170.0050.00318.71
8.1.160.0000.00818.91
8.1.150.0000.00818.73
8.1.140.0050.00317.47
8.1.130.0030.00318.90
8.1.120.0000.00817.46
8.1.110.0080.00817.36
8.1.100.0140.00417.34
8.1.90.0090.00617.50
8.1.80.0170.00017.32
8.1.70.0070.00717.36
8.1.60.0130.00617.59
8.1.50.0120.00617.46
8.1.40.0130.00517.50
8.1.30.0150.00417.66
8.1.20.0070.01117.58
8.1.10.0160.00317.42
8.1.00.0150.00517.50
8.0.300.0070.00018.77
8.0.290.0070.00016.73
8.0.280.0000.00718.37
8.0.270.0030.00317.32
8.0.260.0040.00418.45
8.0.250.0080.00817.01
8.0.240.0050.01116.84
8.0.230.0110.00416.82
8.0.220.0130.00316.82
8.0.210.0160.00016.91
8.0.200.0140.00416.90
8.0.190.0120.00316.87
8.0.180.0140.00316.82
8.0.170.0140.00016.93
8.0.160.0060.01016.82
8.0.150.0000.01516.78
8.0.140.0120.00316.79
8.0.130.0120.00416.79
8.0.120.0080.00816.94
8.0.110.0090.00616.94
8.0.100.0160.00016.87
8.0.90.0000.01616.94
8.0.80.0130.00316.82
8.0.70.0160.00016.68
8.0.60.0100.00516.69
8.0.50.0110.00416.74
8.0.30.0090.00616.88
8.0.20.0080.00816.91
8.0.10.0050.01016.95
7.4.330.0020.00215.55
7.4.320.0070.01016.60
7.4.300.0170.00016.44
7.4.290.0150.00016.50
7.4.280.0170.00016.45
7.4.270.0160.00016.41
7.4.260.0090.00916.56
7.4.250.0090.00716.55
7.4.240.0150.00316.58
7.4.230.0120.00316.53
7.4.220.0090.00416.54
7.4.210.0090.00916.61
7.4.200.0110.00416.58
7.4.190.0130.00316.68
7.4.180.0120.00516.66
7.4.160.0170.00016.45
7.4.150.0060.01116.55
7.4.140.0080.00616.54
7.4.130.0060.00516.35
7.4.120.0060.00416.42
7.4.110.0090.00016.43
7.4.100.0070.00316.54
7.4.90.0000.01116.49
7.4.80.0070.00416.38
7.4.70.0040.01216.20
7.4.60.0000.01716.45
7.4.50.0120.00516.52
7.4.40.0080.00916.48
7.4.30.0120.00516.45
7.4.20.0090.00916.50
7.4.10.0130.00316.43
7.4.00.0100.00716.37

preferences:
32.74 ms | 403 KiB | 5 Q