xref: /PHP-8.2/ext/reflection/tests/bug80370.phpt (revision 902d6439)
1--TEST--
2Bug #80370: Segfault on ReflectionProperty::getAttributes of dynamic property
3--FILE--
4<?php
5#[AllowDynamicProperties]
6class Foobar {
7
8}
9
10$foobar = new Foobar();
11$foobar->bar = 42;
12
13$reflectionObject = new ReflectionObject($foobar);
14$reflectionProperty = $reflectionObject->getProperty('bar');
15var_dump($reflectionProperty->getAttributes());
16--EXPECT--
17array(0) {
18}
19