Re: POSIX regex

From: Date: Thu, 19 Jul 2007 23:20:53 +0000
Subject: Re: POSIX regex
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-31119@lists.php.net to get a copy of this message
On 7/19/07, 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)); My 2c :)
Yeah I also like that casting better than the "u" $0.02 :P
-----Original Message----- From: Stanislav Malyshev [mailto:stas@zend.com] Sent: Friday, 20 July 2007 8:47 AM To: Andrei Zmievski Cc: Andi Gutmans; Derick Rethans; Lukas Kahwe Smith; Ilia Alshanetsky; jani.taskinen@iki.fi; internals@lists.php.net Subject: Re: [PHP-DEV] POSIX regex Python did go down that road, but take a look at Python 3000 effort and you will see that what they are trying to do is exactly what we have: native Unicode strings, without prefixes. Maybe still having u"" - that always produce unicode, regardless of semantics - could be helpful... -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18

« previous php.internals (#31119) next »