pdt
pdt copied to clipboard
standard v.7.4.2 number_format function is wrongly documented
Describe the bug The stanrdard function (in the standard.php file) "number_format" is not correctly documented.
Describe the eclipse environment A clear and concise description about Eclipse Version 2021-12, PDT version 8.0.
Describe your system
- OS: Fedora Linux
- Version 35
- PHP Version 7.4
- Utilis Eclipse IDE
To Reproduce Steps to reproduce the behavior:
- Look at the standard classes/functions of php.
- See that number_format() function has only 2 arguments (but it should be 4)
Expected behavior The function number_format should be documented as:
number_format(
float $num,
int $decimals = 0,
?string $decimal_separator = ".",
?string $thousands_separator = ","
): string
Additional context Add any other context about the problem here.
Looks like the language documentation may have been generated with an out-of-date version of the phpdoc repo. There was a note in the commit about updating the documentation once the PHP 7.4 binaries were available.
The language documentation is out of date. Some arguments of some functions are missing. I have generated the documentation with Debian 11 but I don't have all extensions (official and PECL) installed. The script use reflection of installed packages and the official documentation.
Documentation of PECL extensions are very out of date. How can we generate their documentation ? I will create a Debian 11 VM with PHP 7.4 and install all extensions provided by Debian. Is it a good idea ? Some extensions not maintained has to be removed. Others have to be updated. And some PECL extensions have to be added to the language documentation.
Our language generate need some enhancements. For now it incorrectly "parse" manuala references. I made some fixes for #148, but it still need improvements.
I switched from tons of "preg_replace" to DOMDocument (after compile manual) + some smaller hacks. From my point of view language library is a lot better now