Followed a comment at https://bugs.php.net/bug.php?id=54538 which goes as follows: "I have observed a workaround. Setting LC_MESSAGES does not affect NumberFormatter and is sufficient for gettext translations at the same time."
I commented It is a workaround and it worked for me. This is how my code looks after the change
putenv('LC_MESSAGES='.$locale);
setlocale(LC_MESSAGES, $locale);
setlocale(LC_TIME, $locale);
//Don't set LC_NUMERIC and LC_MONETARY as these may interfere with number formatter and cause to return NaN(https://bugs.php.net/bug.php?id=54538)
//setlocale(LC_NUMERIC, $locale);
//setlocale(LC_MONETARY, $locale);
$currency_formatter = NumberFormatter::create(setlocale(LC_MESSAGES, "0"), NumberFormatter::CURRENCY);