How does chunk_split automatically convert a number in PHP?

When using the chunk_split function in PHP, it automatically converts numbers to strings by adding a specified delimiter after a certain number of characters. This can be useful when formatting numbers for display or transmission. To use chunk_split to convert a number, simply pass the number as a string to the function along with the desired chunk length and delimiter.

$number = 1234567890;
$chunked_number = chunk_split(strval($number), 3, '-');
echo $chunked_number; // Output: 123-456-789-0