I have a simple PHP program, but I am facing this error:
Class 'NumberFormatter' not found
I investigated similar problems in Stackoverflow, but honestly, no one gave a concrete solution. Others suggest updating the version of PHP, others do not comment on a specific line in the php.ini file, and none of them worked for me.
Below is my code: I even used the proposed solution from https://bugs.php.net , but it still does not work.
<!DOCTYPE html>
<html>
<body>
<?php
function writeMsg(){
$f = new \NumberFormatter("en", \NumberFormatter::SPELLOUT);
echo $f->format(1432);
}
writeMsg();
?>
</body>
</html>
source
share