|
|
|
|
|
by wvenable
4542 days ago
|
|
PHP should keep everything as-is and simply add new data type for unicode strings. It should be utterly and completely incompatible with any current function that accepts strings: $binString = "hello";
$unicodeString = u"Hello";
strlen($binString); // 5
strlen($unicodeString); // Error
And then developers can slowly start making functions and methods more unicode aware as necessary. Or make an entirely new string API. Then just have functions to take binary strings and convert them to unicode strings (providing an encoding) and unicode strings to binary strings (also providing an encoding).This would be way safer and simpler than PHP6 or Python 3. |
|