Re: PHP 4.0 Bug #6353 Updated: array_multisort() flags should be bit-or-ed, not seperated by comma
| From: | Andrei Zmievski | Date: | Thu, 31 Aug 2000 13:23:57 +0000 |
| Subject: | Re: PHP 4.0 Bug #6353 Updated: array_multisort() flags should be bit-or-ed, not seperated by comma | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31421@lists.php.net to get a copy of this message | ||
On Thu, 31 Aug 2000, PHP Developers wrote:
> ID: 6353
> Updated by: jmoore
> Reported By: ccjeagle@ms6.hinet.net
> Status: Analyzed
> Bug Type: Documentation problem
> Assigned To:
> Comments:
>
> In pl2 this is correct only
>
> array_multisort($array1,SORT_DESC|SORT_REGULAR,
> $array2,SORT_NUMERIC|SORT_DESC) ;
>
> works.
>
> In 4.0.2 onwards both of these appear to work.
>
> array_multisort($array1,SORT_DESC,SORT_REGULAR,
> $array2,SORT_NUMERIC,SORT_DESC) ;
This is correct.
> array_multisort($array1,SORT_DESC|SORT_REGULAR,
> $array2,SORT_NUMERIC|SORT_DESC) ;
>
>
> Do you guys think we should add a note to the manual about this behaviour?
This one is not, it probably works only by accident.
-Andrei
A room without books is like a body without a soul.
-- Marcus Tullius Cicero (106-43 B.C.)