-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Zend Engine 3 #829
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
Zend Engine 3 #829
Conversation
the work is still undergoing... |
@laruence: PHP 7 is also not finished yet :) |
I agree but I'd drop a note on the list about it to ensure everybody knows/nobody objects before merging this. |
By the way, there might be some veiled version references in places, which would need changing. If someone spots any, let me know. |
|
||
#define ZEND_ENGINE_2 | ||
#define 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.
Since a lot of code may do #ifdef ZEND_ENGINE_2, maybe it'd be good to leave ZEND_ENGINE_2 there but also add ZEND_ENGINE_3 in addition to it?
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.
That'd make sense, would avoid updating existing extensions. Maybe we should add a comment for clarity in that case, though? Something like this:
/* ZEND_ENGINE_2 is also defined for backwards-compatibility
* Therefore, do not assume that because ZEND_ENGINE_2 is defined, it is ZE2
* This only guarantees it is ZE2 or later
*/
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.
Hmm, actually, I don't think I'll keep ZEND_ENGINE_2
around. Code that checks for it should probably just be removed, since that's basically just checking for PHP 5, and it's been a decade since its release. Plus, this'd complicate checks by cross-5/7-compatible code, as ZEND_ENGINE_2
wouldn't guarantee it's actually ZE2, you'd have to do defined(ZEND_ENGINE_2) && !defined(ZEND_ENGINE_3)
, or worse, !defined(ZEND_ENGINE_3)
which isn't future-proof against a hyptothetical Zend Engine 4.
We may also want to change ZEND_EXTENSION_API_NO from 220140815 to 320140815 |
Good point. |
1ea271a
to
7f86ad8
Compare
OK, I updated the API number and I removed all references to ZEND_ENGINE_2. |
FYI Travis should be green, it only failed because of |
I think this is ready to merge, but I'll let you be the judge. Stas? |
Oh, I'd need to add to |
Done. |
7f86ad8
to
2867951
Compare
@@ -29,10 +29,6 @@ | |||
#include <stdlib.h> | |||
#include <stdio.h> | |||
|
|||
#ifndef ZEND_ENGINE_2 | |||
#error HEAD does not work with ZendEngine1 anymore | |||
#endif |
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 do wonder why this is here at all. Were people trying to build PHP5 internal files for PHP 4? Was this in an extension? Regardless, I doubt we still need this message after more than ten years.
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.
initially it came from 7c0e7b4#diff-89fb8b368c48bf62a149e0c2853141e7
and later on was moved to this location
914cf3c#diff-358b07727650bd64ec27ffb307a91f2f
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.
Oh wow, it's been 11 years, then!
looks ok to me |
4c4e02e
to
8a065c5
Compare
I think it's worth considering bumping the version number for ng. Changes may be yet to come, sure, but phpng was such a big overhaul I think it's worth calling "Zend Engine 3".
I haven't updated extensions which check for the constant, but here's a list from grep: