Here’s the reason why it may not work, probably you are having windows platform
“The function money_format() is only defined if the system has strfmon capabilities. For example, Windows does not, somoney_format() is undefined in Windows. ”
found the above statement on php.net