3v4l.org

run code in 300+ PHP versions simultaneously
<?php $results = [ ['name' => 'Benjoe', 'number' => '001'], ['name' => 'Benjoe', 'number' => '002'], ['name' => 'Benjoe', 'number' => '001'], ]; function compare($log1, $log2, $index1, $index2) { return $log1['name'] == $log2['name'] && $log1['number'] == $log2['number'] && $index1 != $index2; } foreach($results as $index1 => $log1) { foreach ($results as $index2 => $log2) { if (compare($log1, $log2, $index1, $index2)) { echo "Item {$index1} has a duplicate at index {$index2}!<br/>\n"; } } }
Output for git.master, git.master_jit, rfc.property-hooks
Item 0 has a duplicate at index 2!<br/> Item 2 has a duplicate at index 0!<br/>

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:
18.75 ms | 401 KiB | 8 Q