Re: POSIX regex

From: Date: Thu, 19 Jul 2007 23:36:09 +0000
Subject: Re: POSIX regex
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to internals+get-31120@lists.php.net to get a copy of this message
On Jul 19, 2007, at 4:14 PM, <scott.mcnaught@synergy8.com> <scott.mcnaught@synergy8.com> wrote:
I don't like the idea of having a "u" prefix for Unicode strings. It may improve performance, and give you some level of fine grain control, but... - It breaks your "keep php simple" policy by introducing a lot of new functions (ugly). - I (plus a lot of others) have an existing php5 application which I wish to eventually use with Unicode, and like others, I don't want to spend time refactoring. - It will also introduce bugs when programmers accidentally forget to add the "u" prefix when working with unicode. If you always want to produce Unicode, I think its best to always use a cast or a conversion function. Eg $str = (unicode)(strtoupper($str)); Or $str = unicode_val(strtoupper($str));
Good idea and it will totally work, except that it won't. strtoupper() operates in different ways according to the type of the string that it gets. -Andrei

« previous php.internals (#31120) next »