Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29861 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37015 invoked by uid 1010); 29 May 2007 09:25:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37000 invoked from network); 29 May 2007 09:25:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 May 2007 09:25:47 -0000 Authentication-Results: pb1.pair.com header.from=antony@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=antony@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:50932] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/E4-00367-991FB564 for ; Tue, 29 May 2007 05:25:47 -0400 Received: (qmail 2792 invoked from network); 29 May 2007 09:25:42 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 29 May 2007 09:25:42 -0000 Message-ID: <465BF195.2080300@zend.com> Date: Tue, 29 May 2007 13:25:41 +0400 User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: php-dev Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: bitwise operations and Unicode strings From: antony@zend.com (Antony Dovgal) Hello. Do you think the engine should support bitwise operators and Unicode strings? If yes, how do you think it should work? Example: This code outputs "3" in native mode and "Fatal error: Unsupported operand types" in Unicode mode. I believe this is an inconsistency and it should be possible to use Unicode strings there. There are several possible ways to implement it: 1) the same as with native strings - apply the operator to each element of the string separately; 2) convert the string to binary (using say iso-8859-1) and then see 1); We can also leave it as is (since it doesn't seem very useful) or even drop the native strings support (it doesn't seem very useful to me either). Opinions? -- Wbr, Antony Dovgal