Closes GH-5860 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
We must increase the refcount of `return_value` only if `cert` is a resource; this is already done in `php_openssl_evp_from_zval()`, though.