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. |
public function testIntlAsSpellout() { $this->assertSame('one hundred twenty-three', $this->formatter->asSpellout(123)); $this->formatter->locale = 'de_DE'; $this->assertSame('einhundertdreiundzwanzig', $this->formatter->asSpellout(123)); // null display $this->assertSame($this->formatter->nullDisplay, $this->formatter->asSpellout(null)); }