3v4l.org

run code in 300+ PHP versions simultaneously
<?php $students = [ [ 'id' => '498', 'uuid' => '6cb91efd-9111-4be8-a2d7-80d3edeed732', 'name' => 'Andrew A. Blaine', 'email' => 'student14@gmail1.com', 'usertype_id' => '6', 'first_name' => 'Andrew A.', 'last_name' => 'Blaine', ], [ 'id' => '499', 'uuid' => '208764a0-c53d-404b-ad05-ee7cba28a51c', 'name' => 'Billie C. Heath', 'email' => 'student15@gmail1.com', 'usertype_id' => '6', 'first_name' => 'Billie C.', 'last_name' => 'Heath', ] ]; $fields = ['id', 'name', 'email']; $newStudents = array_map(function ($student) use ($fields) { $newS = []; foreach ($fields as $field) { if (array_key_exists($field, $student)) { $newS[$field] = $student[$field]; } } return $newS; }, $students); print_r($newStudents);

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.10.0100.00718.75
8.5.00.0180.00920.11
8.4.150.0020.00114.05
8.4.140.0120.00817.44
8.4.130.0100.01017.79
8.4.120.0120.00820.62
8.4.110.0090.01022.48
8.4.100.0130.00817.68
8.4.90.0150.00518.66
8.4.80.0120.00819.59
8.4.70.0090.00317.75
8.4.60.0090.00818.82
8.4.50.0060.00517.80
8.4.40.0080.00819.34
8.4.30.0100.01020.32
8.4.20.0000.00917.82
8.4.10.0060.00320.43
8.3.280.0110.00918.40
8.3.270.0140.00516.50
8.3.260.0080.01216.55
8.3.250.0120.00718.66
8.3.240.0140.00516.50
8.3.230.0070.00216.66
8.3.220.0090.01017.35
8.3.210.0040.00416.72
8.3.200.0130.00616.54
8.3.190.0090.01016.97
8.3.180.0100.00516.64
8.3.170.0120.00618.99
8.3.160.0070.00718.57
8.3.150.0040.01119.18
8.3.140.0150.00320.73
8.3.130.0080.00016.61
8.3.120.0100.01318.78
8.3.110.0000.00818.31
8.3.100.0030.00624.06
8.3.90.0150.00326.77
8.3.80.0060.00318.43
8.3.70.0070.01016.63
8.3.60.0040.01416.63
8.3.50.0140.00320.16
8.3.40.0110.00422.09
8.3.30.0070.00719.19
8.3.20.0050.00324.18
8.3.10.0070.00024.66
8.3.00.0080.00026.16
8.2.290.0100.00820.27
8.2.280.0100.00920.09
8.2.270.0130.00616.42
8.2.260.0040.00417.28
8.2.250.0080.00016.65
8.2.240.0000.00919.07
8.2.230.0070.00320.94
8.2.220.0000.00737.54
8.2.210.0150.00326.77
8.2.200.0040.00716.50
8.2.190.0110.00316.75
8.2.180.0120.00325.92
8.2.170.0090.00918.95
8.2.160.0070.00722.96
8.2.150.0070.00725.66
8.2.140.0000.00724.66
8.2.130.0030.00526.16
8.2.120.0040.00421.04
8.2.110.0030.00722.26
8.2.100.0060.00617.72
8.2.90.0060.00320.52
8.2.80.0060.00319.39
8.2.70.0060.00317.75
8.2.60.0000.00818.05
8.2.50.0050.00318.28
8.2.40.0030.00618.34
8.2.30.0000.00718.02
8.2.20.0000.00720.38
8.2.10.0050.00218.20
8.2.00.0050.00319.37
8.1.330.0110.00820.50
8.1.320.0100.00916.05
8.1.310.0070.00716.87
8.1.300.0150.00417.59
8.1.290.0030.00630.84
8.1.280.0110.00725.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00022.19
8.1.230.0070.00422.62
8.1.220.0050.00317.74
8.1.210.0080.00019.05
8.1.200.0000.00817.23
8.1.190.0030.00717.13
8.1.180.0000.00918.10
8.1.170.0080.00018.50
8.1.160.0000.00820.63
8.1.150.0000.00818.70
8.1.140.0040.00417.46
8.1.130.0030.00318.84
8.1.120.0040.00417.53
8.1.110.0070.00017.47
8.1.100.0030.00617.44
8.1.90.0000.00817.47
8.1.80.0030.00617.45
8.1.70.0040.00417.50
8.1.60.0000.00817.54
8.1.50.0040.00417.45
8.1.40.0030.00517.52
8.1.30.0040.00717.47
8.1.20.0070.00517.55
8.1.10.0090.00617.34
8.1.00.0080.00817.22
8.0.300.0030.00319.98
8.0.290.0000.00716.58
8.0.280.0000.00718.31
8.0.270.0070.00016.74
8.0.260.0070.00018.37
8.0.250.0050.00216.98
8.0.240.0030.00516.94
8.0.230.0020.00616.85
8.0.220.0000.00716.90
8.0.210.0040.00416.79
8.0.200.0000.00716.93
8.0.190.0070.00316.94
8.0.180.0000.00716.93
8.0.170.0070.00616.73
8.0.160.0100.00216.58
8.0.150.0130.00516.63
8.0.140.0130.00616.74
8.0.130.0150.00416.65
8.0.120.0090.00616.56
8.0.110.0110.00316.74
8.0.100.0130.00116.37
8.0.90.0110.00516.81
8.0.80.0090.00716.74
8.0.70.0090.00716.71
8.0.60.0120.00316.60
8.0.50.0120.00316.71
8.0.30.0130.00116.67
8.0.20.0060.00716.72
8.0.10.0120.00016.87
7.4.330.0030.00315.55
7.4.320.0060.00516.53
7.4.300.0060.00016.50
7.4.290.0000.00816.36
7.4.280.0200.00216.39
7.4.270.0080.00916.47
7.4.260.0130.00316.31
7.4.250.0130.00416.39
7.4.240.0100.00516.36
7.4.230.0130.00216.33
7.4.220.0100.00716.31
7.4.210.0180.00416.25
7.4.200.0140.00416.38
7.4.190.0140.00216.42
7.4.180.0140.00516.27
7.4.160.0100.00416.36
7.4.150.0080.00616.40
7.4.140.0100.00216.12
7.4.130.0130.00216.16
7.4.120.0050.00916.35
7.4.110.0080.00416.23
7.4.100.0040.00916.26
7.4.90.0150.00116.30
7.4.80.0150.00516.26
7.4.70.0180.00216.23
7.4.60.0110.00616.24
7.4.50.0090.00416.13
7.4.40.0070.00315.95
7.4.30.0050.00516.08
7.4.20.0090.00216.24
7.4.10.0060.00316.46
7.4.00.0070.00316.27
7.3.330.0080.00316.73

preferences:
155.99 ms | 403 KiB | 5 Q