3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[\AllowDynamicProperties] class SegFault { } $segFault = new SegFault(); $segFault->dynamicProp = 'dont call getHooks!'; $reflectionProperty = new ReflectionProperty($segFault, 'dynamicProp'); $reflectionProperty->getHooks();
Output for 8.4.1 - 8.4.13
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26
Fatal error: Uncaught Error: Call to undefined method ReflectionProperty::getHooks() in /in/nurSR:13 Stack trace: #0 {main} thrown in /in/nurSR on line 13
Process exited with code 255.

preferences:
52.66 ms | 407 KiB | 5 Q