PHP code example of imzhi / chinese-number-converter

1. Go to this page and download the library: Download imzhi/chinese-number-converter 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/ */

    

imzhi / chinese-number-converter example snippets


use Imzhi\ChineseNumberConverter\Converter;

987654321);
$trad = $conv->trad(980654321);
$formalSimp = $conv->formalSimp(907654021);
$formalTrad = $conv->formalTrad(987054320);
echo sprintf(
    "987654321(simp): %s\n980654321(trad): %s\n907654021(formalSimp): %s\n987054320(formalTrad): %s\n",
    $simp,
    $trad,
    $formalSimp,
    $formalTrad
);