- array_uintersect: documentation ( source)
- var_dump: documentation ( source)
<?php
class A {
protected $i = 0;
public function __toString() {
echo "i => {$this->i}\n";
$this->i++;
return "$this->i";
}
}
$a = new A;
echo $a;
$b = ['100', $a];
var_dump(array_uintersect($b, $b, 'strcasecmp'));