What is the correct syntax for formatting numbers in PHP using number_format?

When formatting numbers in PHP using number_format, the correct syntax includes providing the number to be formatted as the first parameter, the number of decimal places as the second parameter, the decimal point character as the third parameter, and the thousands separator character as the fourth parameter. This function can be used to format numbers for displaying currency values or other numerical data in a more readable format.

$number = 12345.67;
$formatted_number = number_format($number, 2, '.', ',');
echo $formatted_number; // Output: 12,345.67