[php-src] Issue #21760: Trait with class constant name conflict against enum case causes SEGV

From: Date: Tue, 14 Apr 2026 20:45:34 +0000
Subject: [php-src] Issue #21760: Trait with class constant name conflict against enum case causes SEGV
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251967@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/21760 Author: ndossche ### Description The following code: ```php <?php trait X { public const Up = 1; } enum Direction { use X; case Up; case Down; } ``` Resulted in this output: ``` SEGV ``` But I expected this output instead: ``` Not that ``` ### PHP Version ```plain Reproduced on master but likely affects all versions since enums were added ``` ### Operating System _No response_

« previous php.bugs (#251967) next »