3v4l.org

run code in 300+ PHP versions simultaneously
<?php $spinArray = [ [1,2,3], [2,3,4], [1,2,3] ]; function checkIfArraysEqual($arrayOfArrays) { $resultIndexes = []; $tempArray = []; foreach($arrayOfArrays as $key => $array) { $tmpKey = array_search($array, $tempArray); if($tmpKey !== false) { $resultIndexes[] = $key; $resultIndexes[] = $tmpKey; } else { $tempArray[$key] = $array; } } return array_unique($resultIndexes); } var_dump(checkIfArraysEqual($spinArray));
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> int(2) [1]=> int(0) }

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:
104.7 ms | 1477 KiB | 4 Q