The issue here is that the user wanted to convert the output of they're code to currency format. Instead of the function returning 1000 they wanted $1,000.00
Solution:
This can be done by wrapping your final output from your code with the number_format() function.
Here is a quick sample below.
$num = 1000; //value to be passed
return "$".number_format($num, 2, '.', ',');
// The above will change the format to $1,000.00