- var_dump: documentation ( source)
- array_intersect_key: documentation ( source)
<?php
$a = array( "one" => 1, "two" => "dos", array(2), "tres" => array ( 1,2) );
$b = array( "one" => 1, "two" => 1, "tres" => 1 );
var_dump(array_intersect_key( $a, $b ));