-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move observer_declared_function_notify until after pass_two()
For early observing, there already exists a op_array_ctor hook on zend_extension. However the goal of the declared_function observer is noting the time when a fully defined function starts existing in the function_tables. This also prevents the observer being called in case there were compilation errors. Ultimately, this now gives a consistent behaviour with respect to how it works when opcache is enabled: - pass_two is done, opcodes and flags are all finalized. - similarly class_linked notifications also only happen once the class is actually finalized. - any extension wanting to delay the observer call may add the ZEND_COMPILE_IGNORE_OBSERVER compiler_option, then call it itself.
- Loading branch information
Showing
1 changed file
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters