Fatal error: Class 'NumberFormatter' not found

You just need to enable this extension in php.ini by uncommenting this line:

extension=ext/php_intl.dll

For more details visit, Enable intl extension


All you need is:

apt-get install php7.0-intl

No need to change php.ini or do anything else. (Tested on PHP 7 on Ubuntu 16.04).

The most up-voted answer here has you uncommenting a .dll which will never solve anything unless you are on a Windows server!


I am using PHP 5.5 version and got the same error in Ubuntu Machine. I have installed php5-Intl package and restarted my apache server. This resolved the issue.

For PHP5

sudo apt-get install php5-intl

For PHP7

sudo apt-get install php7.0-intl

For Mac OS X, use the following command for PHP5.6

brew install php56-intl

For different OS, checkout this page : http://php.net/manual/en/intl.installation.php

To check successful installation, run the command php -m. This should show the intl package in the list.

If you are using XAMPP in Mac OS X, php-intl will sometimes create different problems. You can follow the debug steps mentioned here

If you are facing Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so' error, follow the steps as mentioned here

Tags:

Php