[php] Fix zend_class_implements_interface() compat

The sense of parameter 3 of instanceof_function_ex() appears to have
changed in PHP 7.4 and we need to pass 0 for older versions and 1 for
PHP 7.4.  Words fail me.
This commit is contained in:
Olly Betts 2022-01-21 12:11:39 +13:00
commit ce4a9923ed

View file

@ -96,7 +96,12 @@ static int default_error_code = E_ERROR;
static zend_class_entry SWIG_Php_swig_wrapped_interface_ce;
#if PHP_MAJOR_VERSION == 7
# define zend_class_implements_interface(C, I) instanceof_function_ex(C, I, 1)
/* The sense of parameter 3 of instanceof_function_ex() changed in PHP 7.4!
# if PHP_MINOR <= 3
# define zend_class_implements_interface(C, I) instanceof_function_ex(C, I, 0)
# else
# define zend_class_implements_interface(C, I) instanceof_function_ex(C, I, 1)
# endif
#endif
/* used to wrap returned objects in so we know whether they are newobject