Hi,
Nikita Popov wrote:
I've implemented this variant now. If the comparison function returns a
boolean, you get
Deprecated: usort(): Returning bool from comparison function is
deprecated, return one of -1, 0 or 1 instead in %s on line %d
once per usort() call, and we retry with swapped operands to ensure
compatibility.
Regards,
Nikita
I think that message could be a little misleading, because any negative
or positive value is valid, not just those of magnitude 1, right? IIRC
strcmp($a, $b) doesn't just return -1 and 1, and of course this is also
the case for the classic ($a - $b).
Thanks,
Andrea
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php