Is the zval * value returned by the zend api method zend_call_method same as the zval *retval argument passed into it?
I can see that zend_call_method is declared in zend_interfaces.h. I tried grepping the source directory for its definition, but couldn't find it. Where is it defined?
I have seen some extensions using the same variable as retval argument, and also to receive the return value of the function call. Is that the expected usage?
I just found out that they are not the same.
When calling
DateTime::setTimezonewithzend_call_method, passing thezval *of the originalDateTimeobject as*retvalincrements it's refcount by 1.Whereas the following code does not