[php-src] Issue #10114: Segfault when the enum::cases() method is overridden

From: Date: Fri, 16 Dec 2022 05:41:07 +0000
Subject: [php-src] Issue #10114: Segfault when the enum::cases() method is overridden
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243160@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10114 Author: speller ### Description The following code: ```php <?php enum Test: string { case unknown = 'unknown'; case admin = 'admin'; case graphql = 'graphql'; public static function cases(): array { return [ '1', '2', '3', ]; } } ``` Resulted in this output: ``` Segmentation fault ``` But I expected this output instead: Compile or runtime exception ### PHP Version 8.1.13 ### Operating System Linux

« previous php.bugs (#243160) next »