I\'ve found several responses to this, but none pertaining to PHP (which is an extremely weak typed language):
With regards to PHP, is it appropriate to return
It depends on the situation and how bad the error is, but a good (and often overlooked) option is to throw an exception:
getMessage(), "\n"; }
This will ensure that your function will not fail silently and errors won't go unseen.