Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36094 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13083 invoked from network); 11 Mar 2008 10:22:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2008 10:22:33 -0000 Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.184.238 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 64.233.184.238 wr-out-0506.google.com Received: from [64.233.184.238] ([64.233.184.238:12065] helo=wr-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/A4-21537-66D56D74 for ; Tue, 11 Mar 2008 05:22:31 -0500 Received: by wr-out-0506.google.com with SMTP id c48so1279565wra.23 for ; Tue, 11 Mar 2008 03:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=YpVdvP1va89xQfXMaa23vxmNDH5DeNivXWyHksROwmU=; b=WmKWvPkDlWnLlTGHFr9pKI/k6Okvlknckgy8FQzLEjH2OQiKs0UsDqg4ytQh2QGVUm5AqK5zAiUvbjyFNrA5AMmY6Xq/9iso2XqLA4s+iwXmMepaCWj5TXYTON1Kvh/OPAxLVvGJNIfaXWshyjji1qJ2nbkHqNhtr3+QqkrA0O0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=F3Pm4FniHgFW5VwW5tAz3DoPKRhVMrNVCOZMgA+MtfuHctldgTNL80UPxCw/Bk43ZIFZNxyeilyzS9Pm3tHpAOxarYOPGzbeHR9GjZnSkjHXrtIZo2wLu89xVGDV9d3cSO4099sLwyk3YzQDqLuqxQfpSqPwdHF07pjcwsVx9rI= Received: by 10.150.201.13 with SMTP id y13mr3552885ybf.100.1205230948365; Tue, 11 Mar 2008 03:22:28 -0700 (PDT) Received: by 10.150.52.9 with HTTP; Tue, 11 Mar 2008 03:22:28 -0700 (PDT) Message-ID: Date: Tue, 11 Mar 2008 13:22:28 +0300 To: "Scott McNaught [Synergy 8]" Cc: internals@lists.php.net In-Reply-To: <-1466067017711567869@unknownmsgid> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080311094214.GA4264@redhat.com> <-1466067017711567869@unknownmsgid> Subject: Re: [PHP-DEV] Comparison: ('*' == 0) ... True or false From: indeyets@gmail.com ("Alexey Zakhlestin") On 3/11/08, Scott McNaught [Synergy 8] wrote: > I don't know whether to post this as a bug or not. But I was tricked when programming today. > > It seems that the character "*" is non-strictly equivalent to 0. Is this the correct behavior or am I missing something? > > Test case: > > > var_dump('*' == 0); > > ?> > > Shows boolean(true). > > I was unable to find any documentation as to why this would be the case. try that should explain the situation ;) -- Alexey Zakhlestin http://blog.milkfarmsoft.com/