I have a simple PHP program but I am encountering this error:
Class 'NumberFormatter' not found
I have researched similar issues in Stackoverflow but honestly none gave a concrete solution. Others suggest to upgrade the version of PHP, others un-comment a specific line in the php.ini file and none of those worked for me.
Below is my code: I even used the suggested solution from https://bugs.php.net but it still doesn't work.
<!DOCTYPE html>
<html>
<body>
<?php
function writeMsg(){
$f = new \NumberFormatter("en", \NumberFormatter::SPELLOUT);
echo $f->format(1432);
}
writeMsg();
?>
</body>
</html>