Are there any built-in PHP functions for formatting numbers with decimal points?

Yes, PHP provides a built-in function called number_format() that can be used to format numbers with decimal points. This function allows you to specify the number of decimal places, the decimal point character, and the thousands separator. By using number_format(), you can easily format numbers in your PHP code to display them in a desired format.

$number = 1234.56789;
$formatted_number = number_format($number, 2, '.', ',');
echo $formatted_number; // Output: 1,234.57