[php-src] Issue #15718: Php 8.4 - ReflectionProperty->getHooks() on dynamic property results in segmentation fault

From: Date: Mon, 02 Sep 2024 23:28:20 +0000
Subject: [php-src] Issue #15718: Php 8.4 - ReflectionProperty->getHooks() on dynamic property results in segmentation fault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247684@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/15718 Author: bkdotcom ### Description The following code: https://3v4l.org/nurSR/rfc#vgitmaster ```php <?php #[\AllowDynamicProperties] class SegFault { } $segFault = new SegFault(); $segFault->dynamicProp = 'dont call getHooks!'; $reflectionProperty = new ReflectionProperty($segFault, 'dynamicProp'); $reflectionProperty->getHooks(); ``` Resulted in this output: ``` Segmentation fault: 11 ``` But I expected this output instead: ``` ¯\_(ツ)_/¯ getHooks should return an empty array perhaps throw an exception on a dynamic property definitely not segFault ``` ### PHP Version PHP 8.4 2024-09-03 ### Operating System osx & 3v4l.org

« previous php.bugs (#247684) next »