3v4l.org

run code in 300+ PHP versions simultaneously
<?php function doopScooper($dataArray, $uniqueKeys){ // store the the previously checked sub-arrays here $checked = array(); //loop through the array foreach($dataArray as $k=>$row){ // this will become the sub array that needs to be checked $checkArray = array(); //create the sub array for comparison foreach($uniqueKeys as $key) $checkArray[$key] = isset($row[$key]) ? $row[$key] : NULL; // convert sub array to string for easy comparison $checkArray = json_encode($checkArray); // check for duplicates, if found delete, else add to the checking array if(in_array($checkArray, $checked)) unset($dataArray[$k]); else $checked[] = $checkArray; } return $dataArray; } $lines = "unfinished unfinished 17876 open peters Current/17876 - unfinished unfinished 17830 new peters Current/17830 - unfinished unfinished 17810 new jongr Current/17810 -"; $lines = explode("\n",$lines); $parts=[]; foreach ($lines as $line) $parts[] = explode(' ', $line); var_dump($parts); exit; $lines = doopScooper($parts, array(7));
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(11) { [0]=> string(10) "unfinished" [1]=> string(10) "unfinished" [2]=> string(5) "17876" [3]=> string(5) " open" [4]=> string(0) "" [5]=> string(0) "" [6]=> string(0) "" [7]=> string(6) "peters" [8]=> string(0) "" [9]=> string(0) "" [10]=> string(16) "Current/17876 - " } [1]=> array(11) { [0]=> string(10) "unfinished" [1]=> string(10) "unfinished" [2]=> string(5) "17830" [3]=> string(4) " new" [4]=> string(0) "" [5]=> string(0) "" [6]=> string(0) "" [7]=> string(7) " peters" [8]=> string(0) "" [9]=> string(0) "" [10]=> string(16) "Current/17830 - " } [2]=> array(11) { [0]=> string(10) "unfinished" [1]=> string(10) "unfinished" [2]=> string(5) "17810" [3]=> string(4) " new" [4]=> string(0) "" [5]=> string(0) "" [6]=> string(0) "" [7]=> string(6) " jongr" [8]=> string(0) "" [9]=> string(0) "" [10]=> string(16) " Current/17810 -" } }

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:
53.21 ms | 404 KiB | 8 Q