My php can't find 'normalizer_normalize()' function, why?

后端 未结 1 1413
無奈伤痛
無奈伤痛 2021-01-26 11:15

How come I can\'t use normalizer function?

I am using it exactly as I should, ie: $var = normalizer_normalize($str);

I get php error: no such function!

H

相关标签:
1条回答
  • 2021-01-26 11:47

    From the docs, normalizer_normalize was included in PHP as of version 5.3.0. Prior to that, it was available as a PECL extension. To build it as part of PHP, you'll need to install internationalization support.

    If you need to provide your own equivalent to the Normalizer class, strtr() would be a good option. The only downside is that you will need to provide your own character strings to translate to / from.

    0 讨论(0)
提交回复
热议问题