PHP - Error and Exception Handling
What is the main purpose of the
finally block in PHP exception handling?finally block in PHP exception handling?try block contains code that may throw exceptions, catch handles those exceptions, and finally runs code after both regardless of exceptions.finally block always executes, even if an exception is not thrown or is caught, making it ideal for cleanup.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions