[php-src] Issue #21603: Missing addref for __unset

From: Date: Thu, 02 Apr 2026 13:23:58 +0000
Subject: [php-src] Issue #21603: Missing addref for __unset
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251887@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/21603 Author: iluuu1994 ### Description The following code: ```php <?php class C { public function __unset($name) { global $c; $c = null; var_dump($this); } } $c = new C; unset($c->prop); ``` Resulted in this output: ``` Segfault ``` But I expected this output instead: ``` ``` Originally reported by @cnwangjihe. ### PHP Version ```plain PHP 8.2+ ``` ### Operating System _No response_

« previous php.bugs (#251887) next »