After an unsuccessful attempt to compile my extension with the latest PHP, I discovered that you can no longer directly update
GC_REFCOUNT(). As in zend_types.h, macros concerning GC refcount are defined as below:
Meanwhile, in PHP 7.2 and older versions:
Here’s a simple workaround for compatibility.
This change in internal API was intended to eliminate race-conditions in multi-thread applications, as mentioned in this pull request.
Other notable API changes can be found here, with which you can make your extension compatible with PHP 7.3.