Is there any native PHP function which throws an built-in Exception?
Question
While answering PHP rename() doesn't throws exception on error I was wondering if there are any native PHP functions which throw a built-in Exception, beside the SPL stuff?
Solution
Not really. If you read the note on that page you linked:
Note:
Internal PHP functions mainly use Error reporting, only modern Object oriented extensions use exceptions. However, errors can be simply translated to exceptions with ErrorException.
OTHER TIPS
PHP 5 has an exception model similar to that of other programming languages.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow