Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50165 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56582 invoked from network); 12 Nov 2010 04:19:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Nov 2010 04:19:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=thruska@cubiclesoft.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=thruska@cubiclesoft.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cubiclesoft.com designates 74.208.167.7 as permitted sender) X-PHP-List-Original-Sender: thruska@cubiclesoft.com X-Host-Fingerprint: 74.208.167.7 u15187375.onlinehome-server.com Windows 2000 SP4, XP SP1 Received: from [74.208.167.7] ([74.208.167.7:2315] helo=mail.cubiclesoft.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/D3-09545-060CCDC4 for ; Thu, 11 Nov 2010 23:19:45 -0500 Received: from [192.168.2.100] ([174.18.42.80]) by cubiclesoft.com with MailEnable ESMTP; Thu, 11 Nov 2010 23:19:37 -0500 Message-ID: <4CDCC054.5010603@cubiclesoft.com> Date: Thu, 11 Nov 2010 21:19:32 -0700 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: PHP internals References: <3667608E-11C3-43B8-B652-CDEF46F87CE5@cschneid.com> In-Reply-To: <3667608E-11C3-43B8-B652-CDEF46F87CE5@cschneid.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Supporting Binary Notation for Integers From: thruska@cubiclesoft.com (Thomas Hruska) On 11/11/2010 8:57 PM, Christian Schneider wrote: > On Thu, Nov 11, 2010 at 3:57 PM, Jonah H. Harris wrote: >> RFC added. I'm not sure what the protocol for RFCs is, but I put it under >> the In Discussion heading. Sorry if I was wrong. >> http://wiki.php.net/rfc/binnotation4ints > > Just one little note: If I'm not mistaken this would introduce a subtle BC break when doing the comparison "0b1" == 1 which is false now but would return true afterwards, right? Likewise is_numeric("0b1") would suddenly return true. > > Is it worth the (possible) WTF for something hardly ever used? > > - Chris var_dump(is_numeric("1")); var_dump("1" == 1); var_dump("1" === 1); var_dump(is_numeric("0x1")); var_dump("0x1" == 1); var_dump("0x1" === 1); var_dump(is_numeric("0b1")); var_dump("0b1" == 1); var_dump("0b1" === 1); bool(true) bool(true) bool(false) bool(true) bool(true) bool(false) bool(false) bool(false) bool(false) Probably would be the same as "0x1". -- Thomas Hruska CubicleSoft President Barebones CMS is a high-performance, open source content management system for web developers operating in a team environment. An open source CubicleSoft initiative. Your choice of a MIT or LGPL license. http://barebonescms.com/