Next: Examples, Previous: Overloading Operators, Up: Top [Contents]
Overriding opcode handlers can be used for various purposes other than operator
overloading. For example, when you are implementing a profiler, you may want
to create a custom handler for ZEND_INIT_FCALL
and ZEND_RETURN
.
However, every coin has two sides. Overriding opcode handlers can damage overall performance of your PHP script, as additional handler functions are called every time when executing a hooked opcode.
• Constant Folding | Where operator overloading won’t work. |