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) { var_dump($keys); }); // 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.0070.01416.50
8.3.50.0100.00716.03
8.3.40.0030.01118.72
8.3.30.0090.00618.72
8.3.20.0000.00720.25
8.3.10.0050.00323.66
8.3.00.0080.00019.13
8.2.180.0120.00316.32
8.2.170.0140.00322.96
8.2.160.0030.01020.38
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0080.00021.13
8.2.120.0040.00426.35
8.2.110.0130.01020.99
8.2.100.0110.00018.03
8.2.90.0050.00319.26
8.2.80.0000.00817.97
8.2.70.0090.00017.63
8.2.60.0060.00317.93
8.2.50.0040.00418.10
8.2.40.0050.00320.64
8.2.30.0050.00321.11
8.2.20.0040.00418.11
8.2.10.0000.00718.07
8.2.00.0070.00017.99
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0130.00723.83
8.1.230.0090.00319.04
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0040.00418.48
8.1.160.0040.00419.08
8.1.150.0040.00420.72
8.1.140.0000.00719.57
8.1.130.0030.00318.93
8.1.120.0070.00017.47
8.1.110.0000.00717.38
8.1.100.0080.00017.49
8.1.90.0050.00517.44
8.1.80.0000.00717.34
8.1.70.0070.00017.45
8.1.60.0040.00417.59
8.1.50.0020.00517.57
8.1.40.0030.00517.59
8.1.30.0000.00717.60
8.1.20.0030.00617.66
8.1.10.0000.00817.53
8.1.00.0030.00617.45
8.0.300.0030.00518.77
8.0.290.0000.00716.58
8.0.280.0040.00418.46
8.0.270.0000.00717.21
8.0.260.0000.00616.77
8.0.250.0000.00816.83
8.0.240.0050.00316.86
8.0.230.0000.00816.80
8.0.220.0030.00316.82
8.0.210.0030.00316.69
8.0.200.0030.00316.95
8.0.190.0030.00716.89
8.0.180.0040.00316.91
8.0.170.0040.00416.85
8.0.160.0070.00016.80
8.0.150.0020.00516.94
8.0.140.0070.00416.85
8.0.130.0000.00613.36
8.0.120.0040.00416.88
8.0.110.0000.00816.77
8.0.100.0030.00516.88
8.0.90.0000.00716.88
8.0.80.0100.00616.94
8.0.70.0030.00516.80
8.0.60.0050.00216.86
8.0.50.0050.00216.84
8.0.30.0100.00817.06
8.0.20.0060.01417.40
8.0.10.0000.00816.79
8.0.00.0120.00616.97
7.4.330.0000.00515.55
7.4.320.0040.00416.61
7.4.300.0070.00016.62
7.4.290.0000.01016.58
7.4.280.0050.00516.50
7.4.270.0040.00416.52
7.4.260.0050.00013.34
7.4.250.0040.00416.52
7.4.240.0050.00216.60
7.4.230.0030.00316.53
7.4.220.0070.01016.61
7.4.210.0040.01016.62
7.4.200.0000.00716.61
7.4.160.0120.00416.56
7.4.150.0180.00617.40
7.4.140.0120.00517.86
7.4.130.0160.00416.60
7.4.120.0060.01516.49
7.4.110.0110.00716.26
7.4.100.0070.01016.51
7.4.90.0100.00716.45
7.4.80.0110.00719.39
7.4.70.0130.00316.53
7.4.60.0040.01216.59
7.4.50.0090.00616.36
7.4.40.0100.00716.57
7.4.30.0040.01216.65
7.4.00.0070.00714.79
7.3.330.0000.00613.03
7.3.320.0030.00313.22
7.3.310.0000.00716.27
7.3.300.0050.00216.10
7.3.290.0000.00616.21
7.3.280.0070.01016.24
7.3.270.0120.00617.40
7.3.260.0110.01116.33
7.3.250.0100.00816.41
7.3.240.0110.00916.34
7.3.230.0070.01116.66
7.3.210.0100.00716.27
7.3.200.0070.01016.21
7.3.190.0100.01016.24
7.3.180.0040.01116.42
7.3.170.0080.00816.33
7.3.160.0000.01716.27
7.3.10.0220.01016.24
7.3.00.0190.00216.19
7.2.330.0100.00716.48
7.2.320.0140.00416.41
7.2.310.0040.01216.29
7.2.300.0120.01216.63
7.2.290.0110.00616.21
7.2.130.0490.00316.52
7.2.120.0180.00216.20
7.2.110.0060.00616.27
7.2.100.0100.00716.12
7.2.90.0100.00316.45
7.2.80.0080.00716.52
7.2.70.0160.00316.32
7.2.60.0540.00515.68
7.2.50.0000.01415.98
7.2.40.0330.00816.79
7.2.30.0060.00916.02
7.2.20.0150.00416.49
7.2.10.0200.00816.36
7.2.00.0090.00617.76
7.1.250.0060.01215.09
7.1.200.0040.00415.36
7.1.100.0100.00717.91
7.1.70.0150.00615.28
7.1.60.0130.01334.99
7.1.50.0130.01034.77
7.1.40.0170.01034.26
7.1.30.0070.01834.35
7.1.20.0160.00934.37
7.1.10.0060.00616.53
7.1.00.0080.00416.63
7.0.200.0030.00816.70
7.0.190.0000.01116.45
7.0.180.0040.00816.33
7.0.170.0080.00516.07
7.0.160.0000.01116.01
7.0.150.0060.00616.24
7.0.140.0060.00616.19
7.0.130.0100.00316.40
7.0.120.0040.00816.35
7.0.110.0100.00216.16
7.0.100.0020.01016.15
7.0.90.0030.00916.11
7.0.80.0030.01116.30
7.0.70.0030.00916.25
7.0.60.0040.00816.05
7.0.50.0000.01316.43
7.0.40.0000.01116.50
7.0.30.0000.01216.55
7.0.20.0070.00416.52
7.0.10.0110.00016.48
7.0.00.0050.00516.42

preferences:
52.2 ms | 401 KiB | 5 Q