php-ffi icon indicating copy to clipboard operation
php-ffi copied to clipboard

change ownership of variable & persistence

Open flip111 opened this issue 6 years ago • 0 comments

It would be handy if there was a convenience function that is equivalent to the following:

  1. create a new() variable with owner true and/or persistence true
  2. read out some value over the FFI with the same type as in step 1
  3. memcpy 2 into 1
  4. (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

flip111 avatar Oct 08 '19 03:10 flip111