Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46695 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88012 invoked from network); 13 Jan 2010 16:02:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jan 2010 16:02:59 -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:43919] helo=mail-fx0-f227.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/17-00773-2BEED4B4 for ; Wed, 13 Jan 2010 11:02:59 -0500 Received: by fxm27 with SMTP id 27so686591fxm.23 for ; Wed, 13 Jan 2010 08:02:55 -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:from:date :message-id:subject:to:content-type; bh=lmdQfR7QzBLFH69UqTZgHglcBSKPquMxdwCObrkQE4A=; b=TRWFxYOauXTXDLGPavpn5BKgVVdTo/P/ApbrriFm+zQ5K0I6lQFsIP8a1aa4DT1eIa +OGDbEr7bcgRgUuw/5E56LO1P8w76ZSaqTK9iUPWCgRAjsXzNVt4FMvBdBYDnEUk/CxY Ya5Uw+4PXecilVrZJzFfcrAKlDUyX6iw+VohY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; b=i39Qn2NA3LnqzkKpoLvdmot98PAWmGVhlBNuV+nVGxEt0A37Llnr7vx40iPM1Uu6yv tCJsriSaivn9dSRR1dwFiWwQTf/oq1fE0QFSz+kif+J8wpFoh3JX6ZIE/xIzaTpka0fh MndXY/dp1gDzbL4SW8G5OM2xzuFoKVAVCccCs= MIME-Version: 1.0 Received: by 10.223.143.12 with SMTP id s12mr2327996fau.30.1263398575284; Wed, 13 Jan 2010 08:02:55 -0800 (PST) Reply-To: RQuadling@googlemail.com Date: Wed, 13 Jan 2010 16:02:35 +0000 Message-ID: <10845a341001130802l49d7df07g7ecf846d9867193b@mail.gmail.com> To: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Numerical string comparison - octal and hex. From: rquadling@googlemail.com (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 -- ----- 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