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.
Ejemplo n.º 1
0
 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));
 }