+#elif PHP_VERSION_ID >= 70400
+zval *php_pq_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot)
+{
+ zend_string *member_str = zval_get_string(member);
+ if (SUCCESS != php_pq_object_write_prop_ex(Z_OBJ_P(object), member_str, value)) {
+ value = zend_std_write_property(object, member, value, cache_slot);
+ }
+ zend_string_release(member_str);
+ return value;
+}
+#else
+void php_pq_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot)
+{
+ zend_string *member_str = zval_get_string(member);
+ if (SUCCESS != php_pq_object_write_prop_ex(Z_OBJ_P(object), member_str, value)) {
+ zend_std_write_property(object, member, value, cache_slot);
+ }
+ zend_string_release(member_str);
+}
+#endif