rfc:direct-execution-opcode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
rfc:direct-execution-opcode [2020/12/18 14:25] chopinsrfc:direct-execution-opcode [2021/04/05 02:05] chopins
Line 3: Line 3:
   * Date: 2020-11-13   * Date: 2020-11-13
   * Author: chopins xiao(chopins.xiao@gmail.com)   * Author: chopins xiao(chopins.xiao@gmail.com)
-  * Status: Under Discussion+  * Status: Voting
   * First Published at: http://wiki.php.net/rfc/direct-execution-opcode   * First Published at: http://wiki.php.net/rfc/direct-execution-opcode
  
Line 65: Line 65:
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
 PHP's constant is similar to a C macro,their values are determined when compiled into opcode. Therefore, the value of the system-related constant depends on the compiler's system environment. PHP's constant is similar to a C macro,their values are determined when compiled into opcode. Therefore, the value of the system-related constant depends on the compiler's system environment.
-So magic constant **%%__FILE__%%** is set to the absolute path of the compiler's php source file, instead of the path when the opcode file is executed. **%%__DIR__%%** and **%%__LINE__%%** also have this problem. Therefore, applications that rely on these constants are affected.+So magic constant **%%__FILE__%%** is set to the absolute path of the compiler's php source file, instead of the absolute path of the opcode file when executed. **%%__DIR__%%** and **%%__LINE__%%** also have this problem. Therefore, applications that rely on these constants are affected.
  
 The file path obtained by **error reporting**, **exceptions**, **reflections**, will also be the path to the compiled file, not the current opcode file path. The file path obtained by **error reporting**, **exceptions**, **reflections**, will also be the path to the compiled file, not the current opcode file path.
Line 103: Line 103:
   - To some extent, the security of code deployed on public servers is protected, such as shared hosts   - To some extent, the security of code deployed on public servers is protected, such as shared hosts
  
 +===== Vote =====
 +Voting opens 2021-04-05 and 2021-04-20 at 00:00:00 UTC. 2/3 required to accept.
 +
 +<doodle title="Add OPCache direct execution opcode without source file" auth="chopins" voteType="single" closed="false">
 +   * Yes
 +   * No
 +</doodle>
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
Line 109: Line 116:
 ===== Implementation ===== ===== Implementation =====
 [[https://github.com/php/php-src/pull/6146/commits/75fbf645c431f1afbcc4418ddda86f5afec98853|75fbf645c431f1afbcc4418ddda86f5afec98853]] [[https://github.com/php/php-src/pull/6146/commits/75fbf645c431f1afbcc4418ddda86f5afec98853|75fbf645c431f1afbcc4418ddda86f5afec98853]]
 +
 +===== References =====
 +  - [[https://externals.io/message/111965|Main thread]]
 +  - [[https://externals.io/message/112482|About magic constant]]
rfc/direct-execution-opcode.txt · Last modified: 2021/04/23 18:07 by imsop