I’m trying to figure out whether the code located after throw new Exception in PHP is still executed – I’ve tried it and it didn’t seem to output anything but would like to know for sure.
I’m trying to figure out whether the code located after throw new Exception in
Share
No, code after throwing an exception is not executed.
In this code example i marked the lines which would be executed (code flow) with numbers:
See PHP manual on exceptions: