-
Notifications
You must be signed in to change notification settings - Fork 40
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
Merge PHP5 and PHP7 code #16
Comments
Thank you very much for your suggestion. I think simply merging both files is more confusing. Because PHP API between PHP5 and PHP 7 are very different (hash API, zval, refcount, TSRM support, etc...), so some PHP extension project maintains 2 versions. (For example, php-memcached maintains version 3 for PHP7 and version 2 for PHP 5.) Off course, increasing maintainability is important theme. So we should take another approach. For instance, PHP-independent common code should be splitted into library like php-timecop/tc_timeval.c. |
@hnw I've tried to merge these files and found it nearly impossible because I don't have experience in writing PHP extensions. Spliting PHP-independent code would be a great idea. |
I think the macros like See also: https://wiki.php.net/rfc/native-tls Off course they are still harmless in PHP 7 (because it's defined as ""), so someone prefer to remain TSRM macros. |
@hnw Maybe we could add own macros implementing |
No need to add any macros. It's already defined in /* BC only */
#define TSRMLS_D void
#define TSRMLS_DC
#define TSRMLS_C
#define TSRMLS_CC So, you can keep |
The support of PHP 5.6 was ended the 19 Jan 2017. I think that it is a bad idea to merge the 5 & 7. |
@francisbesset Indeed, just drop PHP 5 :) |
We can easily cut off PHP 5 but I believe this extension helps people writing tests for legacy code with no custom time provider. I think it is still worth supporting those people even after PHP5 support was dropped. |
I think managing PHP5 and PHP7 extension code in separate codebases is horrible. Can we try to merge these files to a single file?
The text was updated successfully, but these errors were encountered: