Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31127 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65882 invoked by uid 1010); 20 Jul 2007 02:31:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 65866 invoked from network); 20 Jul 2007 02:31:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2007 02:31:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=jeremy@peak8solutions.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jeremy@peak8solutions.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain peak8solutions.com from 69.50.1.43 cause and error) X-PHP-List-Original-Sender: jeremy@peak8solutions.com X-Host-Fingerprint: 69.50.1.43 unknown Received: from [69.50.1.43] ([69.50.1.43:18674] helo=peak8solutions.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/49-20012-B6E10A64 for ; Thu, 19 Jul 2007 22:31:09 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Thu, 19 Jul 2007 20:31:01 -0600 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] POSIX regex Thread-Index: AcfKdIQAdW5dFYbsToOHIlqcmz4HuQAAR/1A References: <698DE66518E7CA45812BD18E807866CE648191@us-ex1.zend.net> <469CD717.2070607@pooteeweet.org> <469CE8CE.5080208@zend.com> <698DE66518E7CA45812BD18E807866CE648722@us-ex1.zend.net> <20A6448D-A497-4D95-AA9E-72D69421BB88@gravitonic.com> <469FE9F6.7050406@zend.com> <-4830671619941995385@unknownmsgid> <46A00754.3070507@zend.com> To: "David Coallier" , "Stanislav Malyshev" Cc: , Subject: RE: [PHP-DEV] POSIX regex From: jeremy@peak8solutions.com ("Jeremy Privett") Just as an additional note ... God forbid you ever have to make some kind of change to all or most of = your unicode strings that use "u" -- You can't exactly do a "Find in = Files" for "u" and expect to not sift through a LOT of results that = aren't what you're looking for. Even searching for u" (to denote the u = right before the opening quote) would still bring back a ton of white = noise in a good number of applications that I've seen. Jeremy -----Original Message----- From: david.coallier@gmail.com [mailto:david.coallier@gmail.com] On = Behalf Of David Coallier Sent: Thursday, July 19, 2007 8:19 PM To: Stanislav Malyshev Cc: scott.mcnaught@synergy8.com; internals@lists.php.net Subject: Re: [PHP-DEV] POSIX regex On 7/19/07, Stanislav Malyshev wrote: > > Yeah I also like that casting better than the "u" > > It's different things. Casting means "create string as binary, then in > runtime cast it to unicode", u"" means "this string is unicode". > -- You are right that casting means string -> binary, and that runtime cast to unicode means a string is unicode, however, after speaking with many php developers (not internals), the same answer always come up "It's ugly". Does that simply mean that it's ugly ? I believe not, it means that it's also unreadable, unclear at first look, and easy to overlook. One solution that I could foresee would be to recognize (unicode) within a function call. Ex: strlen( (unicode) "=D3glaig"); This would runtime-cast =D3glaig to a "unicode string". Expected answers: 1) I don't find it to be useful and better than "u" A: It is more readable, easier to find/notice and simply cleaner. 2) No A: Ok.. 3) It's going against the usual casting standard of (type) A: True The decision probably has been made already and if so just let me know and I'll stop trying to rise a voice for the community :P And no, I do not have a patch ;-) > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > > --=20 David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18 --=20 PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php