--TEST-- get_exception_handler() --FILE-- handle(...)); var_dump(get_exception_handler() === $f); echo "\nClosure\n"; set_exception_handler($f = function () {}); var_dump(get_exception_handler() === $f); echo "\nInvokable\n"; set_exception_handler($object = new Invokable()); var_dump(get_exception_handler() === $object); echo "\nStable return value\n"; var_dump(get_exception_handler() === get_exception_handler()); ?>==DONE== --EXPECT-- No exception handler bool(true) Function string bool(true) NULL bool(true) Static method array bool(true) Static method string bool(true) Instance method array bool(true) First class callable method bool(true) Closure bool(true) Invokable bool(true) Stable return value bool(true) ==DONE==