> Hi, > > The larger issue is that higher-order functions do not inherit the > `strict_types` mode from its calling code, and this is not specific to > internal functions. > > If you intend to change that for internal functions (with proper deprecation > period, of course), you might consider making such a behaviour also possible > for userland functions (probably using some opt-in); so that future > higher-order internal functions do not become impossible to polyfill. > > —Claude
Hi, thank you for confirming. If you simply put the problem you pointed out in the code, would it be something like this? https://gist.github.com/SakiTakamachi/8292dbfe92a2029a6c7b506b12296b7d Admittedly, I don't think this is intuitive either. However, if you always inherit the strict_types of the PHP file that is the starting point of processing, in most frameworks the settings in “index.php" will affect everything. When considering the inheritance of strict_types, I think that it should be an attribute that can be set in “php.ini" instead of being specified for each file. What do you think? saki -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php