Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46699 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98575 invoked from network); 13 Jan 2010 16:26:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jan 2010 16:26:41 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.220.227 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 209.85.220.227 mail-fx0-f227.google.com Received: from [209.85.220.227] ([209.85.220.227:42153] helo=mail-fx0-f227.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/69-00773-F34FD4B4 for ; Wed, 13 Jan 2010 11:26:40 -0500 Received: by fxm27 with SMTP id 27so711792fxm.23 for ; Wed, 13 Jan 2010 08:26:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=uFV/5FmbdBoDkcBT5dQJM28IMLGybX7iiZtjTRJfb4s=; b=cl0UHlFyRkxJGadntT5tSM71nRbtAEiGO5TK/dTaolYRrM8wOmdLyZQk6biiIfdsdd gvZCo193uvM3K8yIdgnEe8yuOOAMvPBKHoTSV1Vbegi6xo+XSHawfTqAyOQ1QGl4Lcer otNAXdgTuH3OkbLCcwSI+lbvHQbbig4/bLWrQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; b=TZNSEBGWm7wqEzt1JuaRNZGst83S6XwYKDLQ111Rqbzr6npUPQ0ZGudAmbvsZKwWAw yPEx3vpWTL0ncNGLSMUK6uLI2tMi4DG6EB+B0trsyiMEAJgrYy2v0rO/vWS4Yj9/ToQT EaVrKMtlr03Uoor9G7lNvTAIzDUb5Bc1ORG3o= MIME-Version: 1.0 Received: by 10.223.32.206 with SMTP id e14mr657324fad.3.1263399996241; Wed, 13 Jan 2010 08:26:36 -0800 (PST) Reply-To: RQuadling@googlemail.com In-Reply-To: <4d03254c1001130821k16c8e4b6j4ee208b26e9b87de@mail.gmail.com> References: <10845a341001130802l49d7df07g7ecf846d9867193b@mail.gmail.com> <4d03254c1001130821k16c8e4b6j4ee208b26e9b87de@mail.gmail.com> Date: Wed, 13 Jan 2010 16:26:15 +0000 Message-ID: <10845a341001130826x27271eb3rf4b6cf3cc5765c3@mail.gmail.com> To: hack988 hack988 Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Numerical string comparison - octal and hex. From: rquadling@googlemail.com (Richard Quadling) 2010/1/13 hack988 hack988 : > I think it's not an but! > you must read carefuly about "Single quoted" and "Double quoted" > > 2010/1/14 Richard Quadling : >> Hello. >> >> In looking at numer vs string comparison, I think I've found an oddity. >> >> You can successfully compare hex strings ... >> >> var_dump(255 == '0xff'); >> >> but not octal strings ... >> >> var_dump(63 == '077'); >> >> >> Is this a bug (lack of octal support) or an unexpected feature (hex support)? >> >> >> Neither formats are documented in [1]. >> >> >> Regards, >> >> Richard. >> >> [1] http://docs.php.net/manual/en/language.types.string.php#language.types.string.conversion Not sure you've got what I'm saying ... outputs ... bool(true) bool(false) bool(true) bool(false) Single/double quotes don't come into the issue. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling