-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Zend] Update README.md with new Zend VM executors #8008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
As a new learner to PHP Zend VM, the first place I can find information is this README.md. Unfortunately, it has not included the latest Zend VM kind and code generation script. With code reading and trail-and-error experiments, I found a few updates that might be helpful to new learners. ChangeLog: 1) Add HYBRID threading model 2) Remove --without-old-executor option and description 3) ZE2 --> ZE3 (Since PHP 7) 4) Change default VM kind from CALL to HYBRID Signed-off-by: Su, Tao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know these are wrong in the original text but since we're already touching it we might as well fix it.
Reviewed-by: Ilija Tovilo
@iluuu1994 Thanks for the review and comments which are all applied in the 2nd commit. |
Thanks @stkeke! |
You can disable opcode specialization using `--without-specializer`. | ||
At last you can debug the executor using the original `zend_vm_def.h` or the generated | ||
`zend_vm_execute.h` file. Debugging with the original file requires the `--with-lines` option. | ||
By default ZE3 (since PHP 7) uses the following command to generate executor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of PHP 8.0.0, it is ZE4. Might be better to omit the version, and just say "Zend Engine".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmb69 I can make a new patch to update README.md as your comment.
However, in the zend.h, I found another macro #define ZEND_ENGINE_3 defined immediately following ZEND_VERSION "4.2.0-dev", should we also update it to ZEND_ENGINE_4? (A rough search in source code shows no reference to this macro definition. )
Zend Engine 3 git commit upgraded both ZEND_VERSION and ZEND_ENGINE_3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New README update PR is here: #8057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can replace ZEND_ENGINE_3
, because it is likely used by some extensions. Updating to ZEND_ENGINE_4
makes sense for PHP 9, if there are sufficient API changes (PHP 7 and PHP 8 didn't differ that much regarding ZE).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it. Thanks @cmb69 for the clarification.
As a new learner to PHP Zend VM, the first place I can find information
is this README.md. Unfortunately, it has not included the latest Zend VM
kind and code generation script.
With code reading and trail-and-error experiments, I found a few updates
that might be helpful to new learners.
ChangeLog:
Signed-off-by: Su, Tao [email protected]