Hi, Last week, at a PHP conference, we discussed some missing parts of ext/ffi with one of the most extrimal FFI user - Alexandr Lisachenko. One of the things he is missing is a FFI Type Reflection API. Actually, this is a simple and self-contained feature, that implementation took me a couple of hours.
https://github.com/php/php-src/pull/7217 This doesn't touch any existing code in ext/ffi, just add the API that is better visible through stub: https://github.com/php/php-src/pull/7217/files#diff-3651c407d02a2a152d9aba6e484f6ae7f4c2c85fa2992274d76c0e18364c7e6fL75-R96 Unfortunately, PHP-8.1 is closed for new RFC, so we can merge this as a self-contained feature, or wait for the next version. I ask to merge this into PHP-8.1, but won't do this, in case of any objections. Thanks. Dmitry.