Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31120 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5349 invoked by uid 1010); 19 Jul 2007 23:36:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5334 invoked from network); 19 Jul 2007 23:36:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2007 23:36:11 -0000 Authentication-Results: pb1.pair.com header.from=andrei@gravitonic.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andrei@gravitonic.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain gravitonic.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:51818] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/32-20012-965FF964 for ; Thu, 19 Jul 2007 19:36:11 -0400 Received: from [192.168.30.112] ([207.7.138.44]) (authenticated bits=0) by mail.lerdorf.com (8.14.1/8.14.1/Debian-7) with ESMTP id l6JNa6gw030621; Thu, 19 Jul 2007 16:36:06 -0700 In-Reply-To: <000001c7ca5a$92eef630$b8cce290$@mcnaught@synergy8.com> References: <698DE66518E7CA45812BD18E807866CE648191@us-ex1.zend.net> <54C4340A-D9EA-4B5A-B39C-B55B29B1B3BC@prohost.org> <698DE66518E7CA45812BD18E807866CE648193@us-ex1.zend.net> <469B7FB1.1070507@pooteeweet.org> <698DE66518E7CA45812BD18E807866CE648290@us-ex1.zend.net> <469C6436.2060009@pooteeweet.org> <698DE66518E7CA45812BD18E807866CE6483DF@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> <000001c7ca5a$92eef630$b8cce290$@mcnaught@synergy8.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <1CF4261B-6282-4AFE-BE2D-DA70F80E2A07@gravitonic.com> Cc: Content-Transfer-Encoding: 7bit Date: Thu, 19 Jul 2007 16:36:09 -0700 To: X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: ClamAV 0.91.1/3700/Thu Jul 19 06:13:47 2007 on colo.lerdorf.com X-Virus-Status: Clean Subject: Re: [PHP-DEV] POSIX regex From: andrei@gravitonic.com (Andrei Zmievski) On Jul 19, 2007, at 4:14 PM, 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