3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [11, 22, 32, 44], [22, 33, 44, 45], [12, 24, 25, 31], [15, 16, 31, 41], [22, 33, 44, 45], [44, 22, 32, 11] ]; $set = []; foreach($arr as $curr_array){ sort($curr_array); $hash = implode("|",$curr_array); if(isset($set[$hash])) echo "Duplicate",PHP_EOL; else{ print_r($curr_array); $set[$hash] = true; } }
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Array ( [0] => 11 [1] => 22 [2] => 32 [3] => 44 ) Array ( [0] => 22 [1] => 33 [2] => 44 [3] => 45 ) Array ( [0] => 12 [1] => 24 [2] => 25 [3] => 31 ) Array ( [0] => 15 [1] => 16 [2] => 31 [3] => 41 ) Duplicate Duplicate

preferences:
147.48 ms | 408 KiB | 5 Q