Re: Re: Array comparison works completely different than documented?
| From: | Benjamin Morel | Date: | Wed, 01 Dec 2021 23:24:13 +0000 |
| Subject: | Re: Re: Array comparison works completely different than documented? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-116552@lists.php.net to get a copy of this message | ||
>
> The point is that $a > $b is actually checking whether $b <= $a. This
> is fine for ordered values, but these arrays are not orderable
> (according to PHP's comparison). That might indeed not be documented in
> the PHP manual (the language specification appears to be abandoned anyway).
Shouldn't we throw an exception when comparing arrays with <, <=, >, >=
anyway?
- Benjamin