PHP code example of byjg / wordnumber

1. Go to this page and download the library: Download byjg/wordnumber library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

byjg / wordnumber example snippets


$wordNumber = new \ByJG\WordNumber\EnglishWordNumber();
$wordnumber->write(12.34);  # writes twelve dollars and third four cents

$wordNumber = new \ByJG\WordNumber\PortugueseWordNumber();
$wordnumber->write(12.34);  # writes doze reais e trinta e quatro centavos.

interface WordNumberInterface
{
    public function concatWord();

    public function currency();

    public function tens();

    public function unit();

    public function elevenToNineteen();

    public function twentyToNinety();

    public function hundreds();

    public function oneHundred();
}