php-ffi
php-ffi copied to clipboard
change ownership of variable & persistence
It would be handy if there was a convenience function that is equivalent to the following:
- create a new() variable with owner
trueand/or persistencetrue - read out some value over the FFI with the same type as in step 1
- memcpy 2 into 1
- (optionally ??) free 1
That way things calculated by an extension can be freed immediately and the new php variable passed around as is convenient for it's lifetime