--TEST-- Dynamic property support in php 8.2+ --SKIPIF-- =8.2 only'); ?> --FILE-- getAttributes() as $attribute) { echo "- " . $attribute->getName() . "\n"; } } $node = new ast\Node(); $node->undeclaredDynamic = 123; dump($node); $metadata = new ast\Metadata(); $metadata->undeclaredDynamic = 123; dump($metadata); dump_attributes(ast\Node::class); dump_attributes(ast\Metadata::class); --EXPECTF-- %Sast\Node::__set_state(array( 'kind' => NULL, 'flags' => NULL, 'lineno' => NULL, 'children' => NULL, 'undeclaredDynamic' => 123, )) Deprecated: Creation of dynamic property ast\Metadata::$undeclaredDynamic is deprecated in %sphp82_dynamic_property_attribute.php on line 21 %Sast\Metadata::__set_state(array( 'kind' => NULL, 'name' => NULL, 'flags' => NULL, 'flagsCombinable' => NULL, 'undeclaredDynamic' => 123, )) Attributes of ast\Node: - AllowDynamicProperties Attributes of ast\Metadata: