Someone else elsewhere suggested array_map and serialize. I ended up coming up with this--which is certainly much easier than nesting and recursion and failing miserably in an attempt to basically rewrite the array_intersect function.
echo '<pre>';
$start[]=array(
'id'=>1,
'name'=>'Up',
'action'=>'up'
);
$start[]=array(
'id'=>3,
'name'=>'Down',
'action'=>'down'
);
$start[]=array(
'id'=>5,
'name'=>'Left',
'action'=>'left'
);
$start[]=array(
'id'=>2,
'name'=>'Left',
'action'=>'left'
);
$end[]=array(
'name'=>'Up',
'id'=>1,
'action'=>'up'
);
$end[]=array(
'id'=>8,
'name'=>'Right',
'action'=>'Right'
);
function serialize_array_values($arr){
foreach($arr as $key=>$val){
sort($val);
$arr[$key]=serialize($val);
}
return $arr;
}
$result = array_map("unserialize", array_intersect(serialize_array_values($start),serialize_array_values($end)));
echo "\n\n\n";
echo var_dump($result);
echo '</pre>';