3v4l.org

run code in 300+ PHP versions simultaneously
<?php $questions = Array ( "0" => Array ( "questionid" => "28f68dc4-acc6-4ab7-956d-ca41abf3a4c2", "answer" =>"Antwoord 89", "extra" =>null ) , "1" => Array ( "questionid" =>"28f-28f68dc4-acc6-4ab7-956d-ca41abf3a4c20", "answer" => "Antwoord 20", "extra" => "Extra informatie 20" ) , "2" => Array ( "questionid" => "d8f-28f68dc4-acc6-4ab7-956d-ca41abf3a4c20", "answer" => "Antwoord 3", "extra" =>null ) ); $answers = Array ( "0" => Array ( "questionId" => "28f-28f68dc4-acc6-4ab7-956d-ca41abf3a4c20", "question" => "1. Question 1", "type" => "typequestion/question-text-input" ) ); foreach($questions as $key=>$value){ $k = array_search($value['questionid'], array_column($answers, 'questionId')); if($k!==FALSE){ $questions[$key]['question'] = $answers[$k]['question']; $questions[$key]['type'] = $answers[$k]['type']; } } print_r($questions); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [questionid] => 28f68dc4-acc6-4ab7-956d-ca41abf3a4c2 [answer] => Antwoord 89 [extra] => ) [1] => Array ( [questionid] => 28f-28f68dc4-acc6-4ab7-956d-ca41abf3a4c20 [answer] => Antwoord 20 [extra] => Extra informatie 20 [question] => 1. Question 1 [type] => typequestion/question-text-input ) [2] => Array ( [questionid] => d8f-28f68dc4-acc6-4ab7-956d-ca41abf3a4c20 [answer] => Antwoord 3 [extra] => ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
26.93 ms | 407 KiB | 5 Q