While it is certainly true that you can write
$db = TRUE;
if($db) echo "conn successful";
Nowhere do I see it say that you can write
else echo "conn not successful";
Now, it may just be that it does work like that. If so then it is undocumented, and not something that I've ever tried to do.