将数字格式化为文本的PHP函数[重复]

This question already has an answer here:

This is just kind of a question out of curiosity. Is there a PHP function at this point that converts a number into the textual equivalent? For example 1 = 'one'. 1000 = 'one-thousand'.

I don't think this would really be all that hard to make. Generally the way we speak our numbers is pretty consistant except for the first 20 numbers. I haven't been able to find a function like that though.

I might end up making one though. Could be kind of a fun simple-AI project.

</div>

With intl/NumberFormatter:

var_dump(
    numfmt_create('en_US', NumberFormatter::SPELLOUT)->format(655)
);