3v4l.org

run code in 300+ PHP versions simultaneously
<?php $people = [ ['id' => 2, 'name' => 'John Smith', 'gender' => 'male'], ['id' => 35, 'name' => 'Gareth Foo', 'gender' => 'male'], ['id' => 91, 'name' => 'John Smith', 'gender' => 'male'], ['id' => 27, 'name' => 'Bobby Smith', 'gender' => null], ['id' => 44, 'name' => 'Jane Doe', 'gender' => 'female'], ]; $selectedIds = [44, 91]; $identifiedNames = array_column($people, 'name', 'id'); $filteredNames = array_intersect_key($identifiedNames, array_flip($selectedIds)); var_export($filteredNames);

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.70.0140.00716.63
8.3.60.0000.01418.40
8.3.50.0110.00317.99
8.3.40.0070.00718.57
8.3.30.0070.00718.57
8.3.20.0000.00924.18
8.3.10.0040.00424.66
8.3.00.0000.00726.16
8.2.190.0120.00318.07
8.2.180.0100.00325.92
8.2.170.0040.01218.79
8.2.160.0160.00322.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.83
8.2.110.0030.00620.55
8.2.100.0000.01517.78
8.2.90.0000.00817.75
8.2.80.0000.00818.61
8.2.70.0060.00317.77
8.2.60.0040.00717.97
8.2.50.0030.00518.10
8.2.40.0060.00319.35
8.2.30.0040.00419.05
8.2.20.0040.00418.04
8.2.10.0040.00419.18
8.2.00.0000.00719.24
8.1.280.0140.00425.92
8.1.270.0100.01023.52
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00620.96
8.1.230.0110.00017.77
8.1.220.0030.00617.76
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0080.00017.10
8.1.180.0040.00418.10
8.1.170.0000.00818.35
8.1.160.0050.00318.96
8.1.150.0080.00018.82
8.1.140.0040.00418.74
8.1.130.0000.00720.05
8.1.120.0000.00717.24
8.1.110.0040.00417.36
8.1.100.0030.00617.39
8.1.90.0040.00317.40
8.1.80.0030.00717.29
8.1.70.0000.00717.41
8.1.60.0040.00417.57
8.1.50.0050.00317.50
8.1.40.0080.00017.44
8.1.30.0040.00417.45
8.1.20.0060.00317.64
8.1.10.0040.00417.41
8.1.00.0040.00417.44
8.0.300.0000.00918.77
8.0.290.0040.00416.63
8.0.280.0040.00418.29
8.0.270.0040.00416.75
8.0.260.0000.00618.55
8.0.250.0040.00416.78
8.0.240.0030.00316.91
8.0.230.0060.00016.86
8.0.220.0000.00716.72
8.0.210.0040.00416.81
8.0.200.0040.00416.72
8.0.190.0050.00316.88
8.0.180.0000.00716.73
8.0.170.0050.00316.67
8.0.160.0040.00416.81
8.0.150.0040.00416.81
8.0.140.0000.00716.82
8.0.130.0050.00013.24
8.0.120.0040.00416.77
8.0.110.0020.00516.71
8.0.100.0000.00716.73
8.0.90.0040.00416.71
8.0.80.0070.00716.82
8.0.70.0040.00416.84
8.0.60.0000.00716.69
8.0.50.0050.00216.77
8.0.30.0080.00817.08
8.0.20.0060.02017.28
8.0.10.0170.00716.87
8.0.00.0310.00516.93
7.4.330.0000.00615.55
7.4.320.0000.00616.47
7.4.300.0060.00016.36
7.4.290.0070.00316.46
7.4.280.0060.00316.57
7.4.270.0000.00716.48
7.4.260.0000.00613.21
7.4.250.0020.00516.50
7.4.240.0030.00316.37
7.4.230.0000.00816.43
7.4.220.0070.00016.23
7.4.210.0070.00716.51
7.4.200.0070.00016.51
7.4.140.0230.01016.33
7.4.130.0190.01516.45
7.4.120.0180.01216.59
7.4.110.0300.00916.28
7.4.100.0180.01516.32
7.4.90.0230.01316.38
7.4.80.0300.00516.47
7.4.70.0360.00016.45
7.4.60.0280.01416.27
7.4.50.0160.01716.53
7.4.40.0280.00716.52
7.4.30.0110.02116.38
7.4.20.0280.00516.39
7.4.10.0280.00616.40
7.4.00.0220.00716.54
7.3.330.0000.00716.22
7.3.320.0030.00312.89
7.3.310.0040.00415.97
7.3.300.0040.00416.18
7.3.290.0110.00516.10
7.3.260.0120.00816.18
7.3.250.0270.00516.21
7.3.240.0300.00516.12
7.3.230.0290.00515.94
7.3.220.0260.00916.34
7.3.210.0400.00016.29
7.3.200.0240.01016.24
7.3.190.0260.01516.04
7.3.180.0310.01116.50
7.3.170.0330.00816.30
7.3.160.0300.00416.23
7.3.150.0270.00716.11
7.3.140.0190.01416.23
7.3.130.0190.01116.59
7.3.120.0210.01616.35
7.3.110.0230.01016.17
7.3.100.0220.01216.39
7.3.90.0230.01716.15
7.3.80.0220.01116.09
7.3.70.0300.00616.18
7.3.60.0330.00316.04
7.3.50.0300.00716.11
7.3.40.0290.01016.36
7.3.30.0220.01416.01
7.3.20.0250.01116.23
7.3.10.0250.00716.22
7.3.00.0130.01916.27

preferences:
17.63 ms | 401 KiB | 5 Q