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]; } } 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.0110.00919.45
8.4.120.0140.00620.58
8.4.110.0140.00618.99
8.4.100.0140.00518.85
8.4.90.0110.00922.43
8.4.80.0120.00617.98
8.4.70.0160.00417.75
8.4.60.0110.00918.61
8.4.50.0130.00918.81
8.4.40.0040.01519.29
8.4.30.0140.00720.66
8.4.20.0100.00317.88
8.4.10.0070.00417.43
8.3.260.0100.00916.77
8.3.250.0110.00818.86
8.3.240.0030.00617.20
8.3.230.0140.00516.79
8.3.220.0080.00916.69
8.3.210.0030.00516.71
8.3.200.0040.00516.68
8.3.190.0090.00919.08
8.3.180.0060.00316.86
8.3.170.0120.00618.81
8.3.160.0140.00720.31
8.3.150.0100.01016.42
8.3.140.0080.00018.95
8.3.130.0030.00618.63
8.3.120.0040.00418.81
8.3.110.0060.00320.94
8.3.100.0130.00016.61
8.3.90.0120.00626.77
8.3.80.0060.00318.30
8.3.70.0090.00916.75
8.3.60.0070.01116.86
8.3.50.0070.01017.50
8.3.40.0120.00318.84
8.3.30.0110.00418.75
8.3.20.0050.00224.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.290.0110.00720.33
8.2.280.0090.00516.69
8.2.270.0150.00418.75
8.2.260.0110.00718.18
8.2.250.0030.00617.31
8.2.240.0030.00620.81
8.2.230.0090.00022.58
8.2.220.0030.00624.06
8.2.210.0060.00326.77
8.2.200.0040.00418.17
8.2.190.0070.01116.58
8.2.180.0040.01225.92
8.2.170.0030.01218.83
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0050.00226.16
8.2.120.0040.00426.35
8.2.110.0030.00620.45
8.2.100.0070.00417.91
8.2.90.0060.00317.88
8.2.80.0040.00418.77
8.2.70.0090.00017.93
8.2.60.0000.00818.09
8.2.50.0060.00318.10
8.2.40.0030.00621.15
8.2.30.0060.00319.37
8.2.20.0020.00518.03
8.2.10.0000.00719.22
8.2.00.0040.00419.29
8.1.330.0120.00621.75
8.1.320.0120.00817.90
8.1.310.0040.00418.28
8.1.300.0080.00818.00
8.1.290.0030.00630.84
8.1.280.0100.01325.92
8.1.270.0060.01021.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0070.00323.61
8.1.230.0080.00422.75
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0050.00317.23
8.1.180.0080.00018.10
8.1.170.0000.00818.57
8.1.160.0040.00418.86
8.1.150.0000.00718.89
8.1.140.0040.00418.96
8.1.130.0030.00320.11
8.1.120.0070.00017.51
8.1.110.0040.00417.34
8.1.100.0070.00017.48
8.1.90.0080.00017.34
8.1.80.0040.00417.35
8.1.70.0030.00317.50
8.1.60.0000.00817.57
8.1.50.0050.00317.55
8.1.40.0000.00817.51
8.1.30.0000.00817.66
8.1.20.0000.00717.55
8.1.10.0040.00417.55
8.1.00.0030.00617.52
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0070.00018.43
8.0.270.0030.00316.85
8.0.260.0000.00720.24
8.0.250.0070.00017.05
8.0.240.0000.00716.88
8.0.230.0030.00317.01
8.0.220.0000.00716.96
8.0.210.0000.00716.85
8.0.200.0040.00417.04
8.0.190.0040.00417.04
8.0.180.0040.00416.89
8.0.170.0060.00316.91
8.0.160.0030.00616.98
8.0.150.0080.00016.97
8.0.140.0080.00016.96
8.0.130.0030.00313.34
8.0.120.0050.00316.98
8.0.110.0000.00716.80
8.0.100.0000.00716.84
8.0.90.0000.00716.74
8.0.80.0120.00916.92
8.0.70.0040.00416.86
8.0.60.0040.00416.99
8.0.50.0070.00016.80
8.0.30.0120.00617.09
8.0.20.0210.01517.09
8.0.10.0160.01217.09
8.0.00.0200.01317.25
7.4.330.0000.00515.55
7.4.320.0000.00616.61
7.4.300.0000.00716.42
7.4.290.0080.00016.44
7.4.280.0000.00816.48
7.4.270.0000.00716.65
7.4.260.0000.00613.22
7.4.250.0030.00316.43
7.4.240.0000.00716.58
7.4.230.0050.00216.49
7.4.220.0040.00416.53
7.4.210.0130.00716.64
7.4.200.0000.00716.51
7.4.160.0040.01216.46
7.4.150.0200.01516.61
7.4.140.0190.00616.23
7.4.130.0250.00316.45
7.4.120.0220.00616.37
7.4.110.0280.00416.63
7.4.100.0220.01016.45
7.4.90.0240.00316.47
7.4.80.0180.00916.40
7.4.70.0030.01516.41
7.4.60.0140.00716.65
7.4.50.0200.00316.39
7.4.40.0120.00616.32
7.4.30.0080.00816.40
7.4.20.0270.00016.61
7.4.10.0210.00516.72
7.4.00.0130.00416.52
7.3.330.0030.00316.28
7.3.320.0000.00613.24
7.3.310.0030.00316.20
7.3.300.0060.00016.36
7.3.290.0050.01016.31
7.3.270.0190.01516.28
7.3.260.0240.00416.35
7.3.250.0240.00416.31
7.3.240.0200.00816.34
7.3.230.0200.00816.50
7.3.220.0280.00316.26
7.3.210.0170.01516.40
7.3.200.0210.01216.38
7.3.190.0170.00316.23
7.3.180.0040.01416.71
7.3.170.0120.00616.17
7.3.160.0080.00816.23
7.3.150.0200.00816.54
7.3.140.0210.00916.44
7.3.130.0210.01216.48
7.3.120.0100.01516.42
7.3.110.0130.00716.27
7.3.100.0110.01116.30
7.3.90.0180.00016.21
7.3.80.0150.00416.52
7.3.70.0050.01316.33
7.3.60.0070.01116.45
7.3.50.0130.00416.36
7.3.40.0130.00416.23
7.3.30.0150.00316.33
7.3.20.0160.00516.55
7.3.10.0050.01416.43
7.3.00.0040.01516.29

preferences:
29.31 ms | 403 KiB | 5 Q