Apply strict_types to internal functions
| From: | Saki Takamachi | Date: | Tue, 29 Aug 2023 00:46:18 +0000 |
| Subject: | Apply strict_types to internal functions | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-120939@lists.php.net to get a copy of this message | ||
Hello.
I’m Saki Takamachi.
Inspired by the issue below, I'm thinking of proposing this RFC.
https://github.com/php/php-src/issues/12055
As the documentation below states, PHP's internal functions currently ignore strict_types.
https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict
I think the current spec is not intuitive,
so I propose changing the behavior of the macro ZEND_ARG_USES_STRICT_TYPES() to allow internal
functions to accept strict_types.
I plan to make changes in zend_compile.h and zend_compile.c and do the changes myself, I
haven't written any tests yet, but I'm thinking about making changes like this.
https://github.com/SakiTakamachi/php-src/pull/1
As per How To Create an RFC, I will first try to gauge response to this proposal on the mailing
list.
Thank you
Saki Takamachi