3v4l.org

run code in 300+ PHP versions simultaneously
<?php $profiles = [ [ 'user_id' => 'fcc3d884-fbef-438a-9c86-0ad52c9b1223', 'first_name' => 'Narñia', 'middle_name' => 'Ñ', 'last_name' => 'Cruz', 'ext' => '' ], [ 'user_id' => '0d31557d-1e9f-4db3-ac0d-72e1709fe89c', 'first_name' => 'Randy', 'middle_name' => 'O', 'last_name' => 'Rocker', 'ext' => '' ], [ 'user_id' => '0f93f169-cf56-49df-a76b-7596446104c6', 'first_name' => 'Qwerty', 'middle_name' => 'K', 'last_name' => 'Asdfg', 'ext' => '' ], [ 'user_id' => '23b1f4a2-034c-43b4-96b7-3191d78cead1', 'first_name' => 'Johny', 'middle_name' => 'L', 'last_name' => 'Walker', 'ext' => '' ] ]; $encoded = [ [ 'encoder_id' => '0d31557d-1e9f-4db3-ac0d-72e1709fe89c', 'fullname' => 'Randy O. Rocker', 'encoded' => 10, ], [ 'encoder_id' => '23b1f4a2-034c-43b4-96b7-3191d78cead1', 'fullname' => 'John L. Walker', 'encoded' => 20, ] ]; $encodedByEncoderId = array_column($encoded, null, 'encoder_id'); $combined = array_reduce($profiles, static function (array $combined, array $profile) use ($encodedByEncoderId) : array { $combined[] = [ 'id' => $profile['user_id'], 'fullname' => "{$profile['first_name']} {$profile['middle_name']}. {$profile['last_name']}", 'encoded' => $encodedByEncoderId[$profile['user_id']]['encoded'] ?? 0 ]; return $combined; }, []); print_r($combined);

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.4.10.0060.00322.58
8.3.140.0110.00718.95
8.3.130.0030.00516.84
8.3.120.0100.01020.45
8.3.110.0050.00318.30
8.3.100.0090.00024.06
8.3.90.0030.00626.77
8.3.80.0090.00016.75
8.3.70.0070.01116.63
8.3.60.0080.00818.05
8.3.50.0140.00423.63
8.3.40.0130.00718.83
8.3.30.0160.00618.66
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0080.00026.16
8.2.260.0120.00618.89
8.2.250.0120.00616.62
8.2.240.0070.00317.43
8.2.230.0030.00320.94
8.2.220.0040.00437.54
8.2.210.0050.00326.77
8.2.200.0040.00816.75
8.2.190.0130.00716.75
8.2.180.0000.01425.92
8.2.170.0070.01122.96
8.2.160.0070.00722.96
8.2.150.0030.00625.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0030.00726.35
8.2.110.0110.00019.39
8.2.100.0060.00617.91
8.2.90.0040.00417.75
8.2.80.0050.00318.77
8.2.70.0060.00317.50
8.2.60.0000.00717.63
8.2.50.0000.00818.05
8.2.40.0030.00518.34
8.2.30.0040.00418.15
8.2.20.0040.00418.10
8.2.10.0050.00319.34
8.2.00.0050.00219.39
8.1.310.0110.00716.95
8.1.300.0130.00618.23
8.1.290.0060.00330.84
8.1.280.0090.01225.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00019.28
8.1.230.0040.00720.95
8.1.220.0000.00917.74
8.1.210.0000.00918.77
8.1.200.0040.00417.65
8.1.190.0080.00017.25
8.1.180.0050.00318.10
8.1.170.0080.00018.59
8.1.160.0060.00318.82
8.1.150.0040.00418.91
8.1.140.0000.00818.86
8.1.130.0030.00520.21
8.1.120.0050.00317.50
8.1.110.0060.00317.30
8.1.100.0000.00817.48
8.1.90.0020.00517.49
8.1.80.0040.00417.36
8.1.70.0000.00717.54
8.1.60.0000.00817.61
8.1.50.0040.00417.53
8.1.40.0030.00717.50
8.1.30.0040.00417.62
8.1.20.0000.00917.58
8.1.10.0040.00417.50
8.1.00.0060.00317.53
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0040.00418.46
8.0.270.0000.00717.90
8.0.260.0060.00018.49
8.0.250.0000.00716.92
8.0.240.0000.00717.04
8.0.230.0030.00316.95
8.0.220.0000.00716.80
8.0.210.0030.00316.88
8.0.200.0000.00716.92
8.0.190.0050.00316.98
8.0.180.0000.00716.82
8.0.170.0040.00416.94
8.0.160.0040.00416.89
8.0.150.0000.00816.88
8.0.140.0000.00816.78
8.0.130.0000.00613.40
8.0.120.0080.00016.78
8.0.110.0070.00016.87
8.0.100.0040.00416.89
8.0.90.0020.00516.75
8.0.80.0070.00816.88
8.0.70.0040.00416.79
8.0.60.0050.00216.95
8.0.50.0070.00016.76
8.0.30.0070.01017.21
8.0.20.0080.01117.16
8.0.10.0040.00416.91
8.0.00.0060.01916.57
7.4.330.0000.00415.55
7.4.320.0060.00016.66
7.4.300.0040.00416.50
7.4.290.0000.00716.66
7.4.280.0040.00416.54
7.4.270.0040.00416.67
7.4.260.0000.00513.29
7.4.250.0040.00416.38
7.4.240.0040.00416.43
7.4.230.0030.00316.63
7.4.220.0020.00516.55
7.4.210.0040.01116.57
7.4.200.0070.00016.55
7.4.130.0110.00816.57
7.4.120.0110.00816.51
7.4.110.0090.00916.62
7.4.100.0160.00016.54
7.4.90.0070.01016.65
7.4.80.0070.01016.43
7.4.70.0140.00316.58
7.4.60.0120.00616.41
7.4.50.0110.00616.51
7.4.40.0100.00616.49
7.4.30.0030.01416.56
7.4.20.0090.00916.60
7.4.10.0110.01116.60
7.4.00.0130.00316.53
7.3.330.0070.00016.32
7.3.320.0060.00013.23
7.3.310.0050.00216.47
7.3.300.0030.00316.22
7.3.290.0070.00616.39
7.3.260.0100.00716.67
7.3.230.0080.00816.36
7.3.210.0130.00316.30
7.3.200.0080.00916.36
7.3.190.0140.00316.32
7.3.180.0080.00816.45
7.3.170.0040.01216.36
7.3.160.0120.00416.34
7.3.150.0160.00516.48
7.3.140.0080.00816.41
7.3.130.0060.00916.44
7.3.120.0080.00816.61
7.3.110.0120.00616.34
7.3.100.0120.00316.40
7.3.90.0000.01716.27
7.3.80.0060.01016.32
7.3.70.0130.00316.15
7.3.60.0040.01716.34
7.3.50.0140.00316.30
7.3.40.0060.01216.18
7.3.30.0030.01316.41
7.3.20.0070.01016.20
7.3.10.0130.00516.27
7.3.00.0110.00716.33
7.2.330.0110.00616.68
7.2.320.0130.00316.64
7.2.310.0100.00716.38
7.2.300.0140.00316.47
7.2.290.0070.01016.61
7.2.280.0060.01816.70
7.2.270.0120.00916.30
7.2.260.0070.01016.82
7.2.250.0000.01616.75
7.2.240.0040.01616.60
7.2.230.0070.01116.29
7.2.220.0100.00616.73
7.2.210.0070.01016.57
7.2.200.0130.00716.55
7.2.190.0060.01316.48
7.2.180.0060.01216.60
7.2.170.0090.00916.57
7.2.160.0070.01016.51
7.2.150.0160.00316.67
7.2.140.0060.01216.45
7.2.130.0070.01716.63
7.2.120.0120.01216.57
7.2.110.0100.01016.55
7.2.100.0090.00916.61
7.2.90.0060.01416.80
7.2.80.0090.00916.52
7.2.70.0070.01416.63
7.2.60.0080.01616.64
7.2.50.0060.01916.73
7.2.40.0230.00316.79
7.2.30.0120.01216.72
7.2.20.0110.00716.54
7.2.10.0140.01116.75
7.2.00.0130.01316.61

preferences:
28.96 ms | 403 KiB | 5 Q