Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 77 | All time: 10,159 This week: 673 |
Version | License | PHP version | Categories | |||
php-word-to-number 1.0 | The PHP License | 7 | PHP 5, Text processing, Finances |
Description | Author | |
This package can convert a string with amount in words to a number. |
This PHP package allows you convert numbers written in words to integers
You can install the package via composer:
composer require djunehor/word-to-number
use Djunehor\Number\WordToNumber;
$wordToNumber = new WordToNumber();
$wordTransformer = $wordToNumber->getWordTransformer();
// you can specify locale via: $wordToNumber->getWordTransformer('en');
$number = $wordTransformer->toNumber($word);
$number = word_to_number($word);
//default locale is en
$number = word_to_number($word, 'yo');
// specify Yoruba locale
|Language|Code|Test| |:--------- | :-----------------: | :------: | |English|en|Yes|
Files (11) |
File | Role | Description | ||
---|---|---|---|---|
.circleci (1 file) | ||||
src (1 file, 2 directories) | ||||
tests (1 file) | ||||
.scrutinizer.yml | Data | Auxiliary data | ||
.styleci.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files (11) | / | src |
File | Role | Description | ||
---|---|---|---|---|
Helpers (1 file) | ||||
Locales (2 files) | ||||
WordToNumber.php | Class | Class source |
Files (11) | / | src | / | Locales |
File | Role | Description |
---|---|---|
EnglishWordTransformer.php | Class | Class source |
WordTransformer.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.