[php-src] Issue #9136: Assertion when fetching property of "bad" magic constant

From: Date: Mon, 25 Jul 2022 18:26:48 +0000
Subject: [php-src] Issue #9136: Assertion when fetching property of "bad" magic constant
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242015@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9136 Author: dstogov ### Description The following code: ```php <?php const C = __file__->foo; ``` Resulted in this output: ``` zend_compile.c:9852: zend_compile_const_expr_magic_const: Assertion `ast->attr == T_CLASS_C' failed. ``` But I expected this output instead: ``` Fatal error: Constant expression contains invalid operations ``` ### PHP Version master ### Operating System *

« previous php.bugs (#242015) next »