ZF-11499: PHP5 UTF-8
Hello. My name is Rinat, I want to contribute ZF by my class.
PHP5 UTF-8 is a UTF-8 aware library of functions mirroring PHP's own string functions http://code.google.com/p/php5-utf8/source/browse/ This package is advance of http://sourceforge.net/projects/phputf8 (last updated in 2007).
Features and benefits of using this class * Compatibility with the interface standard PHP functions that deal with single-byte encodings * Ability to work without PHP extensions ICONV and MBSTRING, if any, that are actively used! Uses the fastest available method between MBSTRING, ICONV, native on PHP and hacks. * Useful features are missing from the ICONV and MBSTRING * The methods that take and return a string, are able to take and return null. This useful for selects from a database. * Several methods are able to process arrays recursively * Validating method parameters to allowed types via reflection (You can disable it) * A single interface and encapsulation, You can inherit and override * Test coverage * PHP> = 5.3.x
Example: $s = 'Hello, Привет'; if (UTF8::is_utf8($s)) echo UTF8::strlen($s);