Re: Is it an error?
| From: | Christoph M. Becker | Date: | Wed, 08 Aug 2018 13:54:08 +0000 |
| Subject: | Re: Is it an error? | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-27223@lists.php.net to get a copy of this message | ||
On 08.08.2018 at 12:34, dj.drezyna wrote:
> Under address:
> http://php.net/manual/en/language.operators.comparison.php
>
> Is:
> // only values are compared
> $a = (object) ["a" => "b"];
> $b = (object) ["b" => "b"];
> echo $a <=> $b; // 1
>
> ?>
> Shouldn't be?:
> // only values are compared
> $a = (object) ["a" => "b"];
> $b = (object) ["b" => "b"];
> echo $a <=> $b; // 0
>
> ?>
> If we compare values b and b is the same...
The result is correct, but the comment is wrong. This is fixed in SVN
now[1].
Thanks for reporting this issue. Please, use <https://bugs.php.net/>
next time.
[1] <http://svn.php.net/viewvc?view=revision&revision=345447>
--
Christoph M. Becker