3v4l.org

run code in 300+ PHP versions simultaneously
<?php $venues = array( array( 'venue1' => 1, 'venue2' => 2, ), array( 'venue1' => 3, 'venue2' => 4, ), array ( 'venue1' => 2, 'venue2' => 1, ), array( 'venue1' => 5, 'venue2' => 6, ), ); $result = $pairs = $venues; array_walk($pairs, static fn(array &$value) => sort($value)); var_export($pairs); foreach ($pairs as $k => $pair) { if (count(array_keys($pairs, $pair)) > 1) { unset($result[$k]); } } var_export($result);
Output for git.master, git.master_jit
array ( 0 => array ( 0 => 1, 1 => 2, ), 1 => array ( 0 => 3, 1 => 4, ), 2 => array ( 0 => 1, 1 => 2, ), 3 => array ( 0 => 5, 1 => 6, ), )array ( 1 => array ( 'venue1' => 3, 'venue2' => 4, ), 3 => array ( 'venue1' => 5, 'venue2' => 6, ), )

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:
59.37 ms | 406 KiB | 5 Q