Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59886 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17372 invoked from network); 13 Apr 2012 16:12:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2012 16:12:46 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.216.47 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.216.47 mail-qa0-f47.google.com Received: from [209.85.216.47] ([209.85.216.47:41064] helo=mail-qa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/5F-35770-E70588F4 for ; Fri, 13 Apr 2012 12:12:46 -0400 Received: by qabg1 with SMTP id g1so5715023qab.13 for ; Fri, 13 Apr 2012 09:12:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=nomkR2KnN+FmZ0vAI9qmtJ45CDwEYi+3EU6xjBDXgS8=; b=e1nyp7HlrQxKps442p/HbNBwGJmXMuMuGmt9TcC0ZEAEXsU8LIFDqPs6CYEaeYq6t0 4diLrrqxRokGJYGL61mKDZM+SNSJD9mVDJPbAG8e2jGjOnF9o/fuLVDHBtBubZLMylrT QGHOIQ0s+9va6g0Akx+752uVs+LdadArtTk8OX3c4/tDyL7kKMCxgaiDDLz07VkFJgkv bXs6kLo4Dl5oJTVLvgUh7rj6QpeMXOQit1cdc2DAtPteNpebKtIhJlHBYAL2iw+8CQG2 ahwqq0lHOE79uML/7GfcAoSZIzdvvxDyGMekBkgqMMcU5xRxwmxDzD4iXSl10kNVVY2g SYFg== Received: by 10.224.180.1 with SMTP id bs1mr3508411qab.2.1334333563679; Fri, 13 Apr 2012 09:12:43 -0700 (PDT) Received: from [192.168.201.2] (234.sub-166-250-64.myvzw.com. [166.250.64.234]) by mx.google.com with ESMTPS id cv8sm18234611qab.12.2012.04.13.09.12.41 (version=SSLv3 cipher=OTHER); Fri, 13 Apr 2012 09:12:42 -0700 (PDT) Message-ID: <4F885077.6060800@lerdorf.com> Date: Fri, 13 Apr 2012 09:12:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Stas Malyshev CC: Gustavo Lopes , PHP Developers Mailing List References: <4F884FB4.70901@sugarcrm.com> In-Reply-To: <4F884FB4.70901@sugarcrm.com> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnc/yY7+cI3N/X32Tha8LD+nykHHJ7lx+6R+8x/u1kkzclvO8lkmh/pzpv8L7Mde6JE1bil Subject: Re: [PHP-DEV] '9223372036854775807' == '9223372036854775808' From: rasmus@lerdorf.com (Rasmus Lerdorf) On 04/13/2012 09:09 AM, Stas Malyshev wrote: > However I think it would make sense not to use this conversion in string > comparisons when we know it's lossy - it seems to be outside of the use > case for such comparisons and it seems apparent by now that it is hard > for people to understand why it works this way. Yup, I agree, if the type juggling loses data we should skip the juggle and do a direct comparison which I think is what Gustavo's patch does. If people explicitly cast things then the cast, even if it is lossy, should happen. -Rasmus