rfc:direct-execution-opcode
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:direct-execution-opcode [2020/12/10 11:56] – chopins | rfc:direct-execution-opcode [2020/12/10 12:21] – chopins | ||
---|---|---|---|
Line 13: | Line 13: | ||
When executing, judge whether the loaded PHP file is an opcode file based on the flag. if no flag, will run as it is now.If is opcode file will direct execution without check php source file. | When executing, judge whether the loaded PHP file is an opcode file based on the flag. if no flag, will run as it is now.If is opcode file will direct execution without check php source file. | ||
+ | |||
+ | The **includes** **includes_once** and **require** **require_one** can load opcode file. So if you include opcode files, the source code must use the compiled file path instead of the source file path. | ||
Change function to: | Change function to: | ||
Line 47: | Line 49: | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
This change causes **%%__FILE__%%** path obtained by the constant is not the path to the opcode file, but the path to the compiled PHP file.**%%__DIR__%%** this is also the problem. | This change causes **%%__FILE__%%** path obtained by the constant is not the path to the opcode file, but the path to the compiled PHP file.**%%__DIR__%%** this is also the problem. | ||
+ | |||
The file path obtained by **error reporting**, | The file path obtained by **error reporting**, | ||
Line 75: | Line 78: | ||
* set 1, default value, different version opcode file exec are prohibited | * set 1, default value, different version opcode file exec are prohibited | ||
* set 0, different version opcode file will report **E_WARNING** message | * set 0, different version opcode file will report **E_WARNING** message | ||
- | |||
- | ===== Future Scope ===== | ||
- | support opcode file in phar. | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== |
rfc/direct-execution-opcode.txt · Last modified: 2021/04/23 18:07 by imsop