|
Posted by Thomas Mlynarczyk on 11/01/29 11:32
Also sprach Umberto Salsi:
> IMHO, the FALSE value as an error indicator is a practice that date
> from the PHP 3 era, when the NULL value was not available.
That sounds plausible indeed.
> But instead to encode the error inside the returned value, there are
> better solutions:
> * using PHP 5 exceptions;
> * writing your error handling function that sets a global flag
It depends on the error. If the script does not depend upon a successful
completion of a particular function, then it would be simpler to just return
an indicating value.
Greetings,
Thomas
Navigation:
[Reply to this message]
|