asSpellout() public method

This function requires the PHP intl extension to be installed.
public asSpellout ( mixed $value ) : string
$value mixed the value to be formatted
return string the formatted result.
コード例 #1
0
ファイル: FormatterNumberTest.php プロジェクト: howq/yii2
 public function testIntlAsSpellout()
 {
     $this->assertSame('one hundred twenty-three', $this->formatter->asSpellout(123));
     $this->formatter->locale = 'de_DE';
     $this->assertSame('ein­hundert­drei­und­zwanzig', $this->formatter->asSpellout(123));
     // null display
     $this->assertSame($this->formatter->nullDisplay, $this->formatter->asSpellout(null));
 }