- array_diff: documentation ( source)
<?php
try {
$a = new StdClass();
$a->test();
}catch(Throwable $ee){
echo "Catched exception: " . $ee->getMessage() . "\n";
}
try {
$stdObject = new StdClass();
array_diff([], [$stdObject]);
}catch(Throwable $ee){
//Handler is called, exception is thrown but... IT IS NOT CATCHED!
echo "Catched exception: " . $ee->getMessage() . "\n";
}
echo 'a';