php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79302 Support for underscores in numbers not documented in "floating point numbers"
Submitted: 2020-02-24 16:18 UTC Modified: 2020-03-14 16:18 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tandre@php.net Assigned: cmb (profile)
Status: Closed Package: Documentation problem
PHP Version: 7.4.3 OS:
Private report: No CVE-ID: None
 [2020-02-24 16:18 UTC] tandre@php.net
Description:
------------
https://www.php.net/manual/en/language.types.float.php does not document that underscores (numeric literal separator) are allowed since php 7.4.

php > echo 1_2.3_4;
12.34


https://wiki.php.net/rfc/numeric_literal_separator

> The only restriction is that each underscore in a numeric literal must be directly between two digits.



Expected result:
----------------
The CFG in https://www.php.net/manual/en/language.types.float.php should be updated to document the syntax in php 7.4, and note that the change was made in php 7.4


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-24 16:24 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2020-02-24 16:24 UTC] cmb@php.net
Seems to be missing from the integer docs[1] as well.

[1] <https://www.php.net/manual/en/language.types.integer.php>
 [2020-03-14 16:18 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=349427
Log: Fix #79302: Support for underscores in numbers not documented
 [2020-03-14 16:18 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-03-14 16:18 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-03-14 16:20 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=b03dfce3fd8d878a70d61bc5af878117565a901e
Log: Fix #79302: Support for underscores in numbers not documented
 [2020-03-14 23:15 UTC] mumumu@php.net
Automatic comment from SVN on behalf of mumumu
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=349442
Log: Fix #79302: Support for underscores in numbers not documented
 [2020-03-14 23:15 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=b688deb8a731f86ddb9ec9bccf4f81d3af170695
Log: Fix #79302: Support for underscores in numbers not documented
 [2020-12-30 11:59 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=d7e0a35132b6f8871dda136cd36ea050da20248d
Log: Fix #79302: Support for underscores in numbers not documented
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC