Longhorn PHP 2025 - Speakers and Schedule Announced!

Voting

: one minus one?
(Example: nine)

The Note You're Voting On

Anonymous
6 years ago
setPattern appears to influence only the behavior of the format method, not the parse method of the NumberFormatter object.

$pattern = '#,##0';
$frmtr = NumberFormatter::create('en-US', NumberFormatter::DECIMAL);
$frmtr->setPattern($pattern);
echo $frmtr->parse('12.345');

// returns 12

<< Back to user notes page

To Top