3v4l.org

run code in 300+ PHP versions simultaneously
<?php $answers = [ [ 'questionid' => '28f68dc4-acc6-4ab7-956d-ca41abf3a4c2', 'answer' => 'Antwoord 89', 'extra' => '', ], [ 'questionid' => '28f-28f68dc4-acc6-4ab7-956d-ca41abf3a4c20', 'answer' => 'Antwoord 20', 'extra' => 'Extra informatie 20', ], [ 'questionid' => 'd8f-28f68dc4-acc6-4ab7-956d-ca41abf3a4c20', 'answer' => 'Antwoord 3', 'extra' => '', ], ]; $questions = [ [ 'questionId' => '28f-28f68dc4-acc6-4ab7-956d-ca41abf3a4c20', 'question' => '1. Question 1', 'type' => 'typequestion/question-text-input', ], ]; $indexedQuestions = []; foreach ($questions as $question) { $id = $question['questionId']; $indexedQuestions[$id] = $question; } foreach ($answers as &$answer) { $id = $answer['questionid']; if (isset($indexedQuestions[$id])) { $answer += $indexedQuestions[$id]; unset($answer['questionId']); } } print_r($answers);

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.130.0120.00818.59
8.4.120.0140.00523.84
8.4.110.0040.00518.85
8.4.100.0140.00718.70
8.4.90.0070.00720.63
8.4.80.0120.00618.67
8.4.70.0050.00317.84
8.4.60.0140.01118.58
8.4.50.0100.00117.72
8.4.40.0100.01019.49
8.4.30.0130.00720.85
8.4.20.0130.00718.06
8.4.10.0110.00017.22
8.3.260.0140.00516.69
8.3.250.0120.00719.05
8.3.240.0110.00817.05
8.3.230.0080.01116.60
8.3.220.0030.00418.93
8.3.210.0050.00318.59
8.3.200.0110.00816.62
8.3.190.0120.00317.28
8.3.180.0130.00616.69
8.3.170.0090.00918.86
8.3.160.0110.00718.63
8.3.150.0100.00620.93
8.3.140.0150.00017.16
8.3.130.0060.00318.67
8.3.120.0030.00620.73
8.3.110.0120.00316.75
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0110.00419.36
8.3.70.0190.00318.31
8.3.60.0070.00716.49
8.3.50.0060.01118.43
8.3.40.0170.00318.88
8.3.30.0100.01018.85
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0110.00720.36
8.2.280.0110.00818.96
8.2.270.0070.01317.34
8.2.260.0060.00916.95
8.2.250.0090.00018.20
8.2.240.0060.01016.97
8.2.230.0060.00320.94
8.2.220.0090.00037.54
8.2.210.0050.00326.77
8.2.200.0040.00718.88
8.2.190.0130.00718.50
8.2.180.0120.00325.92
8.2.170.0060.01018.91
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0040.00419.89
8.2.110.0060.00322.29
8.2.100.0040.00817.72
8.2.90.0000.00818.34
8.2.80.0040.00417.97
8.2.70.0080.00017.59
8.2.60.0050.00318.05
8.2.50.0050.00518.05
8.2.40.0000.00918.16
8.2.30.0080.00018.05
8.2.20.0040.00418.05
8.2.10.0030.00519.36
8.2.00.0000.00719.29
8.1.330.0100.00821.88
8.1.320.0140.00516.26
8.1.310.0030.00516.91
8.1.300.0110.00720.16
8.1.290.0050.00530.84
8.1.280.0100.00725.92
8.1.270.0070.00723.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00619.27
8.1.230.0070.00420.97
8.1.220.0040.00417.74
8.1.210.0050.00318.90
8.1.200.0000.00817.36
8.1.190.0030.00517.22
8.1.180.0030.00619.14
8.1.170.0070.00018.71
8.1.160.0000.00718.75
8.1.150.0050.00218.81
8.1.140.0040.00418.84
8.1.130.0070.00020.14
8.1.120.0080.00017.48
8.1.110.0000.00817.37
8.1.100.0000.00717.46
8.1.90.0030.00517.43
8.1.80.0040.00417.49
8.1.70.0030.00317.46
8.1.60.0040.00417.60
8.1.50.0030.00517.43
8.1.40.0040.00417.41
8.1.30.0040.00417.62
8.1.20.0050.00317.66
8.1.10.0040.00417.58
8.1.00.0030.00517.34
8.0.300.0050.00319.98
8.0.290.0040.00416.63
8.0.280.0030.00318.51
8.0.270.0000.00818.11
8.0.260.0030.00320.28
8.0.250.0040.00416.99
8.0.240.0040.00417.05
8.0.230.0000.00716.88
8.0.220.0030.00316.89
8.0.210.0080.00016.84
8.0.200.0000.00817.02
8.0.190.0040.00416.94
8.0.180.0000.00717.05
8.0.170.0080.00016.89
8.0.160.0000.01116.84
8.0.150.0070.00016.96
8.0.140.0050.00316.81
8.0.130.0000.00513.43
8.0.120.0000.00816.79
8.0.110.0080.00016.84
8.0.100.0080.00016.98
8.0.90.0030.00516.92
8.0.80.0090.00916.89
8.0.70.0000.00716.80
8.0.60.0040.00416.98
8.0.50.0040.00416.77
8.0.30.0090.01117.07
8.0.20.0140.01416.95
8.0.10.0030.01417.11
8.0.00.0120.00617.02
7.4.330.0020.00215.55
7.4.320.0000.00616.50
7.4.300.0030.00316.50
7.4.290.0000.00716.55
7.4.280.0050.00316.54
7.4.270.0070.00016.61
7.4.260.0030.00313.22
7.4.250.0030.00316.54
7.4.240.0070.00016.52
7.4.230.0000.00716.43
7.4.220.0020.00516.54
7.4.210.0060.01016.52
7.4.200.0040.00416.49
7.4.160.0030.01216.45
7.4.150.0140.01416.61
7.4.140.0030.01416.63
7.4.130.0120.00416.51
7.4.120.0090.00616.44
7.4.110.0140.00916.54
7.4.100.0130.00316.47
7.4.90.0060.01016.36
7.4.80.0050.01316.43
7.4.70.0040.01216.69
7.4.60.0070.01016.38
7.4.50.0210.00316.48
7.4.40.0200.00416.60
7.4.30.0110.00616.59
7.4.20.0080.00816.42
7.4.10.0120.00416.48
7.4.00.0110.00815.87
7.3.330.0000.00716.30
7.3.320.0050.00013.18
7.3.310.0050.00216.27
7.3.300.0000.00816.24
7.3.290.0050.00916.33
7.3.270.0180.01216.36
7.3.260.0070.01416.35
7.3.250.0080.00816.65
7.3.240.0090.01316.48
7.3.230.0050.01016.40
7.3.220.0040.01216.71
7.3.210.0150.00316.31
7.3.200.0090.00616.44
7.3.190.0090.00616.28
7.3.180.0190.00316.65
7.3.170.0120.00616.66
7.3.160.0040.01216.54
7.3.150.0040.01116.30
7.3.140.0080.00816.36
7.3.130.0150.00016.35
7.3.120.0030.01216.31
7.3.110.0130.00316.65
7.3.100.0150.00616.36
7.3.90.0110.00716.40
7.3.80.0150.00016.65
7.3.70.0060.00916.34
7.3.60.0080.00816.23
7.3.50.0120.00816.52
7.3.40.0070.00716.29
7.3.30.0110.00416.44
7.3.20.0060.01216.26
7.3.10.0100.01016.31
7.3.00.0000.01816.39

preferences:
28.74 ms | 403 KiB | 5 Q