- var_dump: documentation ( source)
- array_intersect: documentation ( source)
<?php
$a = array(
array('id' => 0, 'name' => 'foo'),
array('id' => 1, 'name' => 'bar')
);
$b = array(
array('id' => 0, 'name' => 'foo'),
array('id' => 2, 'name' => 'baz')
);
$intersect = array_intersect($a, $b);
var_dump($intersect);