Yes, of course, it is possible. It puts exit() or die() (or something else that might end up executing) in this particular method, and it will execute.
As far as I know, there are no special restrictions for what you can execute in methods against anything else.
source share