Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29881 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62622 invoked by uid 1010); 29 May 2007 19:05:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 62592 invoked from network); 29 May 2007 19:05:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 May 2007 19:05:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 85.214.94.56 cause and error) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Received: from [85.214.94.56] ([85.214.94.56:46805] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/7B-10662-0597C564 for ; Tue, 29 May 2007 15:04:49 -0400 Received: from baumbart.mbo (dslb-084-063-043-171.pools.arcor-ip.net [84.63.43.171]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id F31D91B34C3; Tue, 29 May 2007 21:04:45 +0200 (CEST) Date: Tue, 29 May 2007 21:04:53 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <14710480085.20070529210453@marcus-boerger.de> To: Antony Dovgal CC: RQuadling@GoogleMail.com, Pierre , David Coallier , php-dev In-Reply-To: <465C48D3.9080407@zend.com> References: <465BF195.2080300@zend.com> <10845a340705290830y337a050amfc3cac12a66eb1b7@mail.gmail.com> <465C48D3.9080407@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] bitwise operations and Unicode strings From: helly@php.net (Marcus Boerger) Hello Antony, so depending on the operator I either have no types or strict typing even though I cannot see/know what I have? That is far from KISS. best regards marcus Tuesday, May 29, 2007, 5:37:55 PM, you wrote: > On 29.05.2007 19:30, Richard Quadling wrote: >> As PHP is loosely typed, "1"==1 is fine. > Right, but that's not true for bitwise operators. > Try this: > $a = 111; > $a |= 50; > var_dump($a); ?>> > and this > $a = "111"; > $a |= "50"; > var_dump($a); ?>> > OR is applied to _characters_ of the string. > Hence I can see no reason to support it at all. >> Is it that with Unicode, this looseness is gone? > Nope. > -- > Wbr, > Antony Dovgal Best regards, Marcus