Hacker News new | past | comments | ask | show | jobs | submit login

Not that I disagree, but PHP only got exceptions relatively recently. The built-in functions existed long before that. Without exceptions, the options for error handling are to return an error value or exit, writing an error message somewhere. Null seems like an appropriate error value for "you asked for some data formatted as a string, and for whatever reason, I couldn't provide it".

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact