Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72550 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47799 invoked from network); 13 Feb 2014 08:33:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2014 08:33:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:35220] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/24-27664-3438CF25 for ; Thu, 13 Feb 2014 03:33:08 -0500 Received: by mail-wi0-f176.google.com with SMTP id hi5so8183379wib.15 for ; Thu, 13 Feb 2014 00:33:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=lqXbIthEOqR12Nq4SskJ72rolL4efJvVyY2AKT4TX4c=; b=TqrHCUN5hAzUO8EigC3k2rkSBeF1hTk+OsF1Cc8JzDV/y0vevYoRMnA8bM/qXpqA98 jugGnEAYbgNTMi5x0ZQJCUZEPLFbifLlLgKYmVQaTiTIU9js+8N75/CW5kYy8deMWfN/ OJzMXO22/8FJMJrwKrekyjNekOV2PNHd4Ve34uAqEFzHo9iIUiIxfWIbYGWVcSL0V3/x Zx+S+sy+178kFVpkfITSnS+o599ncSi2+98AmkCF3M1mOW77mrGy1rCCcVlrn+btCh99 jkL0V49RBi4dGiVpJvRaf4sp7OIVfCHAWPEW2kqYN6fOuM97Q6b/HiPrMzLyXAk6SldB JJiQ== X-Gm-Message-State: ALoCoQmVYRI2oDiW4uekzJGaYQh+vLHZv0o9gAx58aJVL42j8wRBVZn/qXD5FcDZLqvFHlMr83p5 X-Received: by 10.180.7.130 with SMTP id j2mr5326506wia.25.1392280385088; Thu, 13 Feb 2014 00:33:05 -0800 (PST) Received: from [192.168.0.19] ([197.237.26.65]) by mx.google.com with ESMTPSA id fm3sm12157647wib.8.2014.02.13.00.33.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Feb 2014 00:33:03 -0800 (PST) Message-ID: <52FC833F.8040005@seld.be> Date: Thu, 13 Feb 2014 09:33:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Combined Comparison Operator From: j.boggiano@seld.be (Jordi Boggiano) On 13/02/2014 04:58, Davey Shafik wrote: > It works with all types (just as well as <, <=, >=, > work) and is great > for usort() callbacks for example. > > I'd love to get this into 5.6, not sure if we hit feature freeze yet. > Also, not sure if it needs 2/3 majority, but assumed so as pow did? > > Thoughts? I like shorter sort callbacks, but I think a function taking in "any" data type would be more effective since you could in some cases even shorten it to this: usort($arr, 'magic_compare'); Don't take the name at face value though ;) Cheers -- Jordi Boggiano @seldaek - http://nelm.io/jordi