On 24.11.2022 at 16:35, Thomas Hruska wrote: > In ext/standard/file.c: > > #define PHP_STREAM_TO_ZVAL(stream, arg) \ > ZEND_ASSERT(Z_TYPE_P(arg) == IS_RESOURCE); \ > php_stream_from_res(stream, Z_RES_P(arg)); > > Can someone clarify why that macro is named PHP_STREAM_TO_ZVAL? The > current name seems to imply the inverse of what actually happens.
Yeah, looks like the commit which introduced that macro[1] got it wrong, and nobody noticed or changed that later. Maybe you want to provide a PR which fixes this. [1] <https://github.com/php/php-src/commit/39b62f26cfe1f6c93d4009b0651a1a2b5b455345> -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php