3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => [ "SERIAL" => "qwerty", "BRANCH" => "TEST1" ], 1 => [ "SERIAL" => "qwer", "BRANCH" => "TEST1" ], 2 => [ // RETURN THIS AS ERROR AS THE BRANCH "TEST1" has already "qwerty" serial "SERIAL" => "qwerty", "BRANCH" => "TEST2" ], 3 => [ "SERIAL" => "qwerty", "BRANCH" => "TEST1" ], 4 => [ // RETURN THIS AS ERROR AS THE BRANCH "TEST1" has already "qwerty" serial "SERIAL" => "qwerty", "BRANCH" => "TEST3" ], ]; foreach($arr as $sub){ $result[$sub['SERIAL']][] = $sub['BRANCH']; } foreach($result as $branches){ $unique = array_unique($branches); if(count($unique) >1){ var_dump("ERROR:", array_slice($unique,1)); } }
Output for git.master, git.master_jit, rfc.property-hooks
string(6) "ERROR:" array(2) { [0]=> string(5) "TEST2" [1]=> string(5) "TEST3" }

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 | 405 KiB | 5 Q