|
|
|
|
|
by sam_goody
1670 days ago
|
|
The comment on Numeric values is misleading: > Use the _ operator to format numeric values: > $price = 100_10; > // $100 and 10 cents Makes it sound like the underscore replaces the decimal, which it doesn't. The underscores are simply ignored by the PHP parser, so that 10_0.1 === 1_00.1. You could afterwards use PHP to replace the `_` with a comma for display purposes, and I assume that is what they are trying to say. |
|
They really should just use a simpler example, like 10_000_000 being easier to read as "10 million" than 10000000.