- zval tmp_prop, *property = NULL;
-
- property = php_pq_object_read_prop_80(&arg->pq_obj->zo, pi->name, BP_VAR_R, NULL, &tmp_prop);
+ zval tmp_prop, *property;
+#if PHP_VERSION_ID < 80000
+ zval zobj;
+
+ ZVAL_OBJ(&zobj, &arg->pq_obj->zo);
+# if PHP_VERSION_ID < 70100
+ property = zend_read_property(arg->pq_obj->zo.ce, &zobj, pi->name->val, pi->name->len, 0, &tmp_prop);
+# else
+ property = zend_read_property_ex(arg->pq_obj->zo.ce, &zobj, pi->name, 0, &tmp_prop);
+# endif
+#else
+ property = zend_read_property_ex(arg->pq_obj->zo.ce, &arg->pq_obj->zo, pi->name, 0, &tmp_prop);
+#endif