[php-src] Issue #8155: std_object_handlers not interceptable?
| From: | bwoebi | Date: | Sat, 26 Feb 2022 15:56:03 +0000 |
| Subject: | [php-src] Issue #8155: std_object_handlers not interceptable? | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240045@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8155
Comment Author: bwoebi
Instead of changing std_object_handlers directly, it's also possible to swap handlers at object
creation time, i.e. by wrapping the create_object handlers.
I think, albeit it is a bit annoying, the const-ness of std_object_handlers makes sense, because a
lot of code (and extensions) is memcpy()-ing the default handlers from there and may already have
copied before or after your extension code even runs.