Re: [RFC] Combined Comparison Operator

From: Date: Thu, 13 Feb 2014 08:33:03 +0000
Subject: Re: [RFC] Combined Comparison Operator
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
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

Thread (20 messages)

« previous php.internals (#72550) next »