Skip to content
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

Supported PHP Versions #3

Open
nawarian opened this issue Apr 9, 2020 · 2 comments
Open

Supported PHP Versions #3

nawarian opened this issue Apr 9, 2020 · 2 comments

Comments

@nawarian
Copy link
Contributor

nawarian commented Apr 9, 2020

I came to report an issue while compiling the extension using php 7.3.16.

  1. The ZEND_THIS constant
    Seems like the constant ZEND_THIS is not available there. Before this value used to be fetched with getThis() in this repo. With php 7.4 it works. Replacing ZEND_THIS with getThis() solves the issue on php 7.3.

  2. The zend_std_write_property() call
    Another thing quite common in this repo is the following line:

value = zend_std_write_property(object, member, value, cache_slot);

This happens, for example, here:

value = zend_std_write_property(object, member, value, cache_slot);

This seems to be problematic on php 7.3.16 as zend_std_write_property() returns void and value is a zval, passed for writing as the third parameter. Removing the assignment seems to solve the issue.

Note: I'm running MacOS Catalina. But this seems to be independent from build environment.


What is the minimum version supported?

I'd be happy to send out some pull requests if php 7.3 is supposed to be supported. I'm not a C expert but I think I can help a bit there.

Cheers!

@joseph-montanez
Copy link
Owner

Thanks, initially I was limiting the scope to just PHP 7.4, as the stubs require PHP 7.4 due to type signatures in method calls. However, supporting PHP 7.3 via the C code isn't an issue. Thanks for catching this I'll make an update to change this and test on 7.3.

@joseph-montanez
Copy link
Owner

Just an update I've been trying on and off to support 7.3. While I am able to build, the property writers are segment faulting. So this will have to be an ongoing effort. I don't want this to slow down the binding's implementation, so, for now, I'll push 7.3 support to a different branch. I looked at how php-src handles 7.4 and 7.3 and they don't, they just keep completely different repos, so if-defs are not littered all over the place for various php versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants