nineteenfeet / nf-number-to-word
Convert a number into its word representation. e.g. 1 => one
Installs: 22 537
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=8.1
Requires (Dev)
- overtrue/phplint: ^9.0
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.2
- slevomat/coding-standard: ^8.12
- squizlabs/php_codesniffer: ^3.7
README
This component provides a means to convert numeric number (e.g. 1023
) to a string of works (e.g. one thousand and twenty three
). It also provides a laminas-view helper called numberToWord.
Installation with Composer
$ composer require "nineteenfeet/nf-number-to-word"
Usage
use NFNumberToWord\NumberToWords; $number = 1999; $numberToWords = new NumberToWords(); $string = $numberToWords->toWords($number);