How can using number_format() in PHP simplify the process of formatting numerical values for display without relying on string manipulation functions?

When formatting numerical values for display in PHP, using number_format() simplifies the process by directly converting a numerical value into a formatted string with specified decimal points, thousands separator, and decimal separator. This eliminates the need for manual string manipulation functions like sprintf() or number_format().

$number = 1234567.89;
$formatted_number = number_format($number, 2, '.', ',');
echo $formatted_number; // Output: 1,234,567.89