Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70082 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17402 invoked from network); 10 Nov 2013 10:19:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2013 10:19:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:38307] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/11-12065-99D5F725 for ; Sun, 10 Nov 2013 05:19:06 -0500 Received: by mail-lb0-f170.google.com with SMTP id u14so2634254lbd.1 for ; Sun, 10 Nov 2013 02:19:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=joLPK0PZwKnZh1A0p5FusRdZzGKwpv13JW4pgB6JLZA=; b=jd7OSvi4PWjnCC3yc82zY2FgzvF9W2i1M23N+eWeFfLMjmNBTQZ7MYW2YcCKdlYvxM y3iitASpoGLbHTcqDg4FAGhEX0zX+tlWBhiINq6hYU2Oxly++4YsipMuuLLlreD2PKOR bS7BmC+J+EvBA4rYPxAtrM9IAkWl6wn9jm31RzeC4ndR09VC1hIVrCI6l4Hj1VwKNMQt n+PfNKkMJuxj4H8hqpjAya59w819s00QSXxyQWVyCbcbfzcm4KDMMoGhD0wKSopyLAAP ypUUYjC+3ZZJ7TPNYYqDpsoapviGCMHx9rFf+cviGXR8x2l0Wt38tv9b1jhNJ5rPTmoY Xtdg== X-Received: by 10.112.138.1 with SMTP id qm1mr6083530lbb.1.1384078741786; Sun, 10 Nov 2013 02:19:01 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.154.201 with HTTP; Sun, 10 Nov 2013 02:18:20 -0800 (PST) In-Reply-To: <527F5A95.1030601@sugarcrm.com> References: <527DF228.1080108@sugarcrm.com> <527F3B9B.8040006@sugarcrm.com> <527F5A95.1030601@sugarcrm.com> Date: Sun, 10 Nov 2013 19:18:20 +0900 X-Google-Sender-Auth: weNTzkXvxyAD5djswo66pVs55HI Message-ID: To: Stas Malyshev Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e01182e22bed69704eacff1f4 Subject: Re: [PHP-DEV] [RFC] Comparison and conversion inconsistency - need more info From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e01182e22bed69704eacff1f4 Content-Type: text/plain; charset=UTF-8 Hi Stas, On Sun, Nov 10, 2013 at 7:06 PM, Stas Malyshev wrote: > > uses compare_function() later. There may be other array functions use > > it. I'm not sure if there are 'internal' functions that does not perform > > comparison(or conversion) non standard way like compare_function(). > > compare_function *is* the standard way. That's what comparison operators > use, just look at the code. Yes, but the result differs when comparison is done as expression. (e.g. if (expression)) I haven't look into this issue carefully yet, but simple test codes revel the difference. I guess engine is converting values in expression according to context, but not in min(). That's the reason why (expression) and min() result differs, I suppose. I would say it's a bug of min() calling compare_function() as it is now. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e01182e22bed69704eacff1f4--