Closed TysonAndre closed 1 year ago
Maybe we could use the new PHP 8.0 function get_debug_type()
? Although that means a special case to handle resource
and require people to use PHP 8.
Maybe we could use the new PHP 8.0 function
get_debug_type()
? Although that means a special case to handle resource and require people to use PHP 8.
I'd rather not - I'm using 7.4 right now, OSes with Long Term Support (LTS) releases would be using php 7 for a while, and 7.3 still has security support. Some of these scripts claim to be for PHP version 5 in the file headers.
Personally, I'd have gone for an array mapping from gettype() names to desired names. But the is_*() calls work too.
It'd break if they ever changed to match the php7.0 real types, which is why I preferred the verbose version
@kocsismate can you confirm (as could probably be assumed by your approval of the PR) that these changes are, as you requested previously, compatible with the output of gen_stub?
@salathe Yes, these changes are compatible with gen_stub.php, however there are some other differences between the output of the two scripts that should also be addressed sometime soon. Latest example: https://github.com/php/doc-en/commit/d6aee4a5004f7d532f24c06ea2ab2ac0b91b8664#diff-6193da7441a9b194146a36138e21738e68cf63c7f17cbd4bff4726d431f2093e
Latest example: php/doc-en@d6aee4a#diff-6193da7441a9b194146a36138e21738e68cf63c7f17cbd4bff4726d431f2093e
This would need changes to https://github.com/php/doc-base/blob/master/scripts/docgen/class.tpl (and generally, we should align these .tpl files and the files in https://github.com/php/doc-base/tree/master/RFC/skeletons).
For documentation of global constants and class constants.
Address review comments in #44