assert
assert copied to clipboard
use a string wrapper to support intl, mbstring and iconv extension
Since the PHP intl extension is available, there is no need to use mbstring anymore. Websites uses UTF-8 and PHP intl extension is more comfortable than mbstring. I've replaced all mb_* functions with the grapheme_* functions.
@beberlei What do you think about a new major version which uses the PHP intl extension?
@sandrokeil I am unsure, it must be a new major version that is for sure, but i don't know if intl is as widespread as mbstring.
@stof I'm not sure why this was happened. I've restored it. Thanks.
@beberlei I thought that the Intl extension replaces mbstring and is mainly used, if projects uses i18n. In my case I didn't need mbstring because I rely on the Intl extension. I don't know which one is more widespread.
@beberlei We can use a simple String Wrapper like Zend and we have a WinWin solution and can bring a new minor release.
Maybe even simpler, check for the extensions on the appropriate functions and call the correct method. What do you think? The order is intl, mbstring and iconv.
I will update the PR if you accept this.
ping @beberlei +1 for string wrapper and full backward compatibility? We will support intl, mbstring, iconv and native. No method signature will be changed, but the encoding is only used by mbstring and iconv.
:+1:
any update?