Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60502 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70174 invoked from network); 7 May 2012 08:46:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2012 08:46:39 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.22 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.22 smtp2.ist.utl.pt Linux 2.6 Received: from [193.136.128.22] ([193.136.128.22:43227] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/D4-33304-BEB87AF4 for ; Mon, 07 May 2012 04:46:36 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id BF0A570003CB; Mon, 7 May 2012 09:46:32 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp2.ist.utl.pt ([127.0.0.1]) by localhost (smtp2.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id aBxn22hWDQ4Y; Mon, 7 May 2012 09:46:32 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 6E0D470003CC; Mon, 7 May 2012 09:46:32 +0100 (WEST) Received: from slws007.slhq.int (a79-168-248-114.cpe.netcabo.pt [79.168.248.114]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 0E9EC2004F95; Mon, 7 May 2012 09:46:31 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net, "Kris Craig" References: <4F847B8A.9010007@sugarcrm.com> <733bc8ea59cf6737563a62886e92fcb6.squirrel@www.l-i-e.com> Date: Mon, 07 May 2012 10:46:29 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: User-Agent: Opera Mail/11.62 (Win32) Subject: Re: [PHP-DEV] [off] PHP: a fractal of bad design From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Mon, 07 May 2012 10:31:00 +0200, Kris Craig wrote: > That being said, I agree that this *definitely* should be fixed if the > examples cited are indeed accurate (I've been working with PHP for over > 10 years and I was never aware of this bizarre behavior, either). I > don't > know the history of this, but I at least would consider it to be a bug. > A rather large one, in fact; though I think some of the fears expressed > are a bit hyperbolic. And if you're fixing a serious bug or security > vulnerability, as a general rule of thumb, this automatically supercedes > any concerns regarding BC breakage IMHO. This has already been discussed in its own thread, see http://comments.gmane.org/gmane.comp.php.devel/72790 ; see also https://bugs.php.net/bug.php?id=54547 Doing away entirely with this behavior (e.g. making " 2" == "2" compare false) would be a rather large BC break, that discussion is restricted to whether integers in strings should be treated differently from integer literals for comparison purposes when their range is exceeded. I wrote a patch for that, and, while not really caring one way or the other, I'm not convinced it's necessary and I some have consistency concerns (though float overflows already get a similar treatment). -- Gustavo Lopes