I've been using this exact same code for ages, and I have never had a single problem. Now all of a sudden it has stopped working.
I have read across the internet about this problem, and apparently you need
PHP 5.3 or higher
Fatal error: Class 'NumberFormatter' not found
$format = new \NumberFormatter('en_US', \NumberFormatter::CURRENCY);
return $format->formatCurrency($value, 'AUD');
intl.default_locale = fr_FR
; This directive allows you to produce PHP errors when some error
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
intl.error_level = E_WARNING
This seems to be some really weird problem, and I somehow fixed it by doing the following:
I upgraded my PHP in Wamp through this tutorial. I also updated my timezone in
php.ini When I upgraded it didn't work, so I reverted back to my previous version of PHP, and voilà - it worked.
I have absolutely no idea how this solved the problem, however it worked for me.