RE: [PHP-DEV] POSIX regex
| From: | scott dot mcnaught at synergy8 dot com | Date: | Thu, 19 Jul 2007 23:14:34 +0000 |
| Subject: | RE: [PHP-DEV] POSIX regex | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-31118@lists.php.net to get a copy of this message | ||
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 :)
-----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