Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29867 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52653 invoked by uid 1010); 29 May 2007 15:06:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52638 invoked from network); 29 May 2007 15:06:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 May 2007 15:06:32 -0000 Authentication-Results: pb1.pair.com header.from=david.coallier@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=david.coallier@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 66.249.82.231 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: david.coallier@gmail.com X-Host-Fingerprint: 66.249.82.231 wx-out-0506.google.com Linux 2.4/2.6 Received: from [66.249.82.231] ([66.249.82.231:47109] helo=wx-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/0A-08609-7714C564 for ; Tue, 29 May 2007 11:06:32 -0400 Received: by wx-out-0506.google.com with SMTP id i28so1233529wxd for ; Tue, 29 May 2007 08:06:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=UeS5MXkio5TqoShbGNRovJYsKqa4wjNhnJ8z/qkrNzC1RL0CV8B+RftTVueg77Z4aVFXdpwYegHVH5EhJ84DwG/idZJDfLF8223wjpjuyAoSuO5FD3BpG4GU0fe6xTvnfgZ8fvfpIig2wZDLFAn3FBupCMKHtEkJnIPyi67Envw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=RXOpjklq0ToRFU9ktDwI1zwu/3bgklJfkbn2y/hUF4hsIKBwbbdx1SJShixGNptc+/yeauc06NG6mFNPVdnoIeV9eEt365N2jWdGDWY46IDoNDX90YqKU7nlMGDWEizZbc6Sv4MaCgE4lkEacnKRBlOJjz3UzX5EWBCdzXp1hiQ= Received: by 10.90.105.20 with SMTP id d20mr4780388agc.1180451187536; Tue, 29 May 2007 08:06:27 -0700 (PDT) Received: by 10.90.87.1 with HTTP; Tue, 29 May 2007 08:06:27 -0700 (PDT) Message-ID: Date: Tue, 29 May 2007 11:06:27 -0400 Sender: david.coallier@gmail.com To: "Antony Dovgal" Cc: php-dev In-Reply-To: <465BF195.2080300@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <465BF195.2080300@zend.com> X-Google-Sender-Auth: c4c5e3d489f72d6f Subject: Re: [PHP-DEV] bitwise operations and Unicode strings From: davidc@php.net ("David Coallier") On 5/29/07, Antony Dovgal wrote: > Hello. > > Do you think the engine should support bitwise operators and Unicode strings? > If yes, how do you think it should work? > > Example: > $a = "1"; > $a|="2"; > var_dump($a); > ?> > > 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. Definitely > > 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); I would probably be for the solution #2 and of course using the unicode.runtime_encoding ini setting to convert it to binary. > > 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). I think this is a bad choice.. might not be useful to you, but might be to some other people > Opinions? > > -- > Wbr, > Antony Dovgal > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- David Coallier