Skip to content

Conversation

@devnexen
Copy link
Member

@devnexen devnexen commented Jan 31, 2026

Summary

  • Add a code example showing how to use NumberFormatter::ROUNDING_MODE with NumberFormatter::ROUND_DOWN to truncate values to a specified number of fraction digits without rounding

🤖 Generated with Claude Code

Add a code example showing how to use NumberFormatter::ROUNDING_MODE
with NumberFormatter::ROUND_DOWN to truncate values to a specified
number of fraction digits without rounding.

This addresses user confusion about how to truncate rather than round
values when using FRACTION_DIGITS.

See: php/php-src#21048

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@devnexen devnexen requested a review from Girgias January 31, 2026 21:20
@lacatoire
Copy link
Contributor

LGTM! This addresses the confusion reported in php/php-src#21048, where a user was unaware that ROUNDING_MODE with ROUND_DOWN could be used to truncate instead of round.

@devnexen
Copy link
Member Author

devnexen commented Feb 2, 2026

Thanks please do not merge I m waiting gina opinion whether the XML used is appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants