- print_r: documentation ( source)
- array_diff: documentation ( source)
<?php
/**
* So if you have 2 arrays holding either a string or integer and a key
* holding an array, after php5.3, you'll get these error messages. Weird
* that the behaviour has changed.
*/
$a = array(1, 2, 3, 4);
$b = array(1, 2, 3 => array(1), 4);
$diff = array_diff($a, $b);
print_r( $diff );