# set_exception_handler()

- Thread: https://externals.io/message/8919
- Original archive: https://news-web.php.net/php.internals/8919
- Started by Timm Friebe on 2004-04-03T18:13:46+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #8919 — Timm Friebe — 2004-04-03T18:13:46+00:00

URL: https://externals.io/message/8919#8919

Hello,

I wanted to check back on the status of my patch to
zend_builtin_functions.c I sent a while ago. It changes
 `set_exception_handler()` to accept the pseudo-type "callable" (instead of
a string referring to a global function).

Examples:
  set_exception_handler('function_name');
  set_exception_handler(array('class_name', 'static_method'));
  set_exception_handler(array($instance, 'instance_method'));

This also makes `set_exception_handler()` more consistent with all the
other callback functionality, e.g. `set_error_handler()`.

Will this patch make it into CVS?

- Timm

---

## #8921 — Andi Gutmans — 2004-04-03T19:26:53+00:00

URL: https://externals.io/message/8919#8921 · In reply to: #8919

In general, I have no problem with adding this consistency.
Where is a reference to $instance held until the exception occurs? I took a 
quick look and couldn't see it but I'm probably missing something.

Andi

At 08:13 PM 4/3/2004 +0200, Timm Friebe wrote:
>Hello,
>
>I wanted to check back on the status of my patch to
>zend_builtin_functions.c I sent a while ago. It changes
>set_exception_handler() to accept the pseudo-type "callable" (instead of
>a string referring to a global function).
>
>Examples:
>   set_exception_handler('function_name');
>   set_exception_handler(array('class_name', 'static_method'));
>   set_exception_handler(array($instance, 'instance_method'));
>
>This also makes `set_exception_handler()` more consistent with all the
>other callback functionality, e.g. `set_error_handler()`.
>
>Will this patch make it into CVS?
>
>- Timm
