[php-src] Issue #21072: zend_ast assertion failure in class property initializer
| From: | vi3tL0u1s | Date: | Thu, 29 Jan 2026 03:23:17 +0000 |
| Subject: | [php-src] Issue #21072: zend_ast assertion failure in class property initializer | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251622@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/21072
Author: vi3tL0u1s
### Description
The following code:
```php
<?php
class C { public $p = (unset)C::class; }
new C;
```
Resulted in this output:
```
php: /path/to/php-src/Zend/zend_ast.c:817: zend_ast_evaluate_inner: Assertion `0' failed.
Aborted
```
Commit:
```
4d5b651e9003ece86b4146a0d1d12417a07eb3a3
```
Build configuration:
```
CC="clang" CXX="clang++" CFLAGS="-DZEND_VERIFY_TYPE_INFERENCE"
CXXFLAGS="-DZEND_VERIFY_TYPE_INFERENCE" ./configure --enable-debug
--enable-address-sanitizer --disable-all --enable-cli
```
### PHP Version
```plain
PHP 8.6.0-dev (cli) (built: Jan 29 2026 14:13:52) (NTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.6.0-dev, Copyright (c) Zend Technologies
with Zend OPcache v8.6.0-dev, Copyright (c), by Zend Technologies
```
### Operating System
Ubuntu 22.04