3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 'ApplicantDetails_AdditionalApplicantDetails_OtherSurnames_OtherSurname' => [['name' => 'one'], ['name' => 'two']], 'ApplicantDetails_AdditionalApplicantDetails_OtherNames' => [['surname' => 'three', 'forename' => 'forename'],['surname' => 'four']], 'ApplicantDetails_AdditionalApplicantDetails_BirthSurname' => 'birthSurname', 'ApplicantDetails_PresentSurname' => 'presentSurname' ]; $surnameKeys = [ ['ApplicantDetails_AdditionalApplicantDetails_OtherSurnames_OtherSurname', 'name'], ['ApplicantDetails_AdditionalApplicantDetails_OtherNames', 'surname'], 'ApplicantDetails_AdditionalApplicantDetails_BirthSurname', 'ApplicantDetails_PresentSurname' ]; $something = []; array_walk($surnameKeys, function ($keys) use ($data) { var_dump($keys); if (is_array($keys)) { echo 'is array'; if (isset($data[$keys[0]])) { echo 'here'; $something[] = array_column($data[$keys[0]], $keys[1]); } } }); // array_map(function ($keys) use ($data) { // if (is_array($keys)) { // if (isset($data[$keys[0]])) { // $something[] = array_column($data[$keys[0]], $keys[1]); // continue; // } // } // if (isset($data[$keys])) { // $something[] = $data[$keys]; // } // }, $surnameKeys); var_dump($something); // $uniq = array_unique($something); // var_dump($uniq);

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.0030.01316.63
8.3.50.0070.00716.48
8.3.40.0150.00618.83
8.3.30.0090.00618.73
8.3.20.0080.00020.30
8.3.10.0080.00021.59
8.3.00.0050.00319.50
8.2.180.0040.01118.16
8.2.170.0140.00422.96
8.2.160.0110.00320.52
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0040.00420.95
8.2.120.0040.00426.35
8.2.110.0070.00321.07
8.2.100.0080.00418.21
8.2.90.0060.00319.17
8.2.80.0080.00017.97
8.2.70.0030.00617.63
8.2.60.0060.00318.05
8.2.50.0000.00818.10
8.2.40.0000.00720.55
8.2.30.0030.00621.09
8.2.20.0050.00318.13
8.2.10.0000.00718.20
8.2.00.0040.00418.05
8.1.280.0090.00625.92
8.1.270.0000.00722.00
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.83
8.1.230.0040.00718.97
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0040.00417.36
8.1.190.0060.00317.35
8.1.180.0050.00318.10
8.1.170.0040.00418.44
8.1.160.0030.00318.95
8.1.150.0000.00820.68
8.1.140.0000.00819.56
8.1.130.0030.00318.91
8.1.120.0040.00417.49
8.1.110.0040.00417.48
8.1.100.0040.00417.50
8.1.90.0070.00317.39
8.1.80.0050.00217.39
8.1.70.0070.00017.47
8.1.60.0030.00617.52
8.1.50.0040.00417.43
8.1.40.0030.00617.52
8.1.30.0000.00717.56
8.1.20.0070.00017.63
8.1.10.0040.00417.59
8.1.00.0040.00417.54
8.0.300.0000.00718.77
8.0.290.0020.00516.75
8.0.280.0070.00018.41
8.0.270.0000.00717.28
8.0.260.0030.00316.84
8.0.250.0030.00317.02
8.0.240.0000.00716.96
8.0.230.0030.00316.97
8.0.220.0070.00016.94
8.0.210.0000.00716.89
8.0.200.0000.00617.03
8.0.190.0110.00016.76
8.0.180.0040.00416.92
8.0.170.0000.00816.84
8.0.160.0000.00716.95
8.0.150.0080.00016.84
8.0.140.0040.00816.84
8.0.130.0030.00313.35
8.0.120.0000.00816.81
8.0.110.0080.00016.82
8.0.100.0000.00816.73
8.0.90.0040.00417.04
8.0.80.0140.00316.85
8.0.70.0070.00016.81
8.0.60.0050.00316.82
8.0.50.0000.00716.71
8.0.30.0080.00917.05
8.0.20.0070.01317.40
8.0.10.0000.00816.80
8.0.00.0060.01216.58
7.4.330.0050.00015.55
7.4.320.0000.00716.59
7.4.300.0000.00616.63
7.4.290.0090.00316.55
7.4.280.0000.00716.64
7.4.270.0070.00016.54
7.4.260.0060.00013.40
7.4.250.0000.00816.50
7.4.240.0000.00816.61
7.4.230.0040.00416.62
7.4.220.0090.00616.45
7.4.210.0050.01116.48
7.4.200.0000.00716.64
7.4.160.0110.00516.50
7.4.150.0110.00717.40
7.4.140.0090.01017.86
7.4.130.0090.00916.58
7.4.120.0100.00816.51
7.4.110.0090.00916.59
7.4.100.0110.00616.50
7.4.90.0040.01316.59
7.4.80.0100.01319.39
7.4.70.0100.00716.56
7.4.60.0090.00916.55
7.4.50.0070.01116.30
7.4.40.0060.01016.57
7.4.30.0070.01016.66
7.4.00.0050.01214.96
7.3.330.0000.00613.39
7.3.320.0030.00313.34
7.3.310.0030.00316.48
7.3.300.0000.00716.23
7.3.290.0060.00016.26
7.3.280.0080.01016.31
7.3.270.0030.02017.40
7.3.260.0120.00816.44
7.3.250.0070.01416.40
7.3.240.0100.01216.62
7.3.230.0090.00916.61
7.3.210.0120.00316.38
7.3.200.0030.01316.45
7.3.190.0130.00916.38
7.3.180.0060.01116.43
7.3.170.0120.00916.41
7.3.160.0070.01016.50
7.3.120.0080.01114.81
7.3.110.0120.00414.71
7.3.100.0070.01014.54
7.3.90.0080.00814.91
7.3.80.0040.00814.84
7.3.70.0090.00414.88
7.3.60.0070.01014.93
7.3.50.0060.00914.91
7.3.40.0100.00314.66
7.3.30.0030.01314.85
7.3.20.0120.00316.70
7.3.10.0080.00816.62
7.3.00.0050.00716.73
7.2.330.0030.01416.54
7.2.320.0030.01316.65
7.2.310.0040.01216.71
7.2.300.0100.00616.70
7.2.290.0120.00516.84
7.2.250.0100.01015.00
7.2.240.0040.01515.11
7.2.230.0030.00915.31
7.2.220.0060.00314.84
7.2.210.0100.00714.97
7.2.200.0060.00915.29
7.2.190.0110.00415.09
7.2.180.0140.00415.28
7.2.170.0090.00615.16
7.2.130.0040.00716.73
7.2.120.0100.00317.01
7.2.110.0030.01016.77
7.2.100.0000.01516.91
7.2.90.0030.01316.73
7.2.80.0100.00316.89
7.2.70.0030.01416.82
7.2.60.0030.01216.63
7.2.50.0070.01016.84
7.2.40.0040.01117.09
7.2.30.0100.00716.86
7.2.20.0080.00616.63
7.2.10.0060.00917.01
7.2.00.0050.00818.13
7.1.330.0070.00715.86
7.1.320.0100.00715.86
7.1.310.0040.01115.93
7.1.300.0100.00715.89
7.1.290.0030.01015.85
7.1.280.0030.00715.88
7.1.270.0070.00715.73
7.1.260.0130.00315.68
7.1.250.0030.01215.99
7.1.200.0090.00615.95
7.1.100.0000.01018.23
7.1.70.0000.01117.23
7.1.60.0140.01134.77
7.1.50.0150.01034.46
7.1.40.0140.01134.30
7.1.30.0180.00734.45
7.1.20.0130.01334.52
7.1.10.0070.00416.47
7.1.00.0040.00816.43
7.0.200.0030.00916.63
7.0.190.0030.00916.73
7.0.180.0000.01316.35
7.0.170.0060.00616.19
7.0.160.0030.00816.28
7.0.150.0000.01216.18
7.0.140.0040.00816.38
7.0.130.0000.01316.54
7.0.120.0040.00816.45
7.0.110.0030.00916.50
7.0.100.0070.00416.19
7.0.90.0080.00416.28
7.0.80.0110.00016.38
7.0.70.0060.00616.17
7.0.60.0030.01016.20
7.0.50.0040.00816.49
7.0.40.0080.00516.23
7.0.30.0040.00816.16
7.0.20.0040.00816.50
7.0.10.0110.00316.35
7.0.00.0030.01116.55

preferences:
45.31 ms | 401 KiB | 5 Q