[php-src] Issue #12410: Unexpected behavior of the spaceship operator when used with enums

From: Date: Wed, 11 Oct 2023 07:31:12 +0000
Subject: [php-src] Issue #12410: Unexpected behavior of the spaceship operator when used with enums
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245538@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12410 Author: pavlepredic ### Description The following code: ```php <?php enum Enum: int { case C1 = 1; case C2 = 2; } echo Enum::C1 <=> Enum::C2; echo "\n"; echo Enum::C1->value <=> Enum::C2->value; ?> ``` Resulted in this output: ``` 1 -1 ``` But I expected this output instead: ``` -1 -1 ``` ### PHP Version 8.2.11 ### Operating System _No response_

« previous php.bugs (#245538) next »