Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29926 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75033 invoked by uid 1010); 30 May 2007 03:59:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 75018 invoked from network); 30 May 2007 03:59:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 May 2007 03:59:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=andi@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=andi@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.114 as permitted sender) X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 63.205.162.114 unknown Windows 2000 SP4, XP SP1 Received: from [63.205.162.114] ([63.205.162.114:28254] helo=us-ex1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/D6-10662-BA6FC564 for ; Tue, 29 May 2007 23:59:41 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 29 May 2007 20:59:34 -0700 Message-ID: <698DE66518E7CA45812BD18E807866CE3AFF92@us-ex1.zend.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] bitwise operations and Unicode strings Thread-Index: Aceh03Qb0dm/XWy+R/elLqGsR64jtgAm2VdA References: <465BF195.2080300@zend.com> To: "Antony Dovgal" , "php-dev" Subject: RE: [PHP-DEV] bitwise operations and Unicode strings From: andi@zend.com ("Andi Gutmans") I'd go with (2) for BC sake and as breaking BC here would have very little value in the first place. Andi=20 > -----Original Message----- > From: Antony Dovgal [mailto:antony@zend.com]=20 > Sent: Tuesday, May 29, 2007 2:26 AM > To: php-dev > Subject: [PHP-DEV] bitwise operations and Unicode strings >=20 > Hello. >=20 > Do you think the engine should support bitwise operators and=20 > Unicode strings? > If yes, how do you think it should work? >=20 > Example: > $a =3D "1"; > $a|=3D"2"; > var_dump($a); > ?> >=20 > This code outputs "3" in native mode and "Fatal error:=20 > Unsupported operand types" in Unicode mode. > I believe this is an inconsistency and it should be possible=20 > to use Unicode strings there. >=20 > There are several possible ways to implement it: > 1) the same as with native strings - apply the operator to=20 > each element of the string separately; > 2) convert the string to binary (using say iso-8859-1) and=20 > then see 1); >=20 > We can also leave it as is (since it doesn't seem very=20 > useful) or even drop the native strings support (it doesn't=20 > seem very useful to me either). > Opinions? >=20 > -- > Wbr, > Antony Dovgal >=20 > -- > PHP Internals - PHP Runtime Development Mailing List To=20 > unsubscribe, visit: http://www.php.net/unsub.php >=20 >=20