1--TEST-- 2gen_stub.php: Test that attributes are applied to constants, properties, and methods 3--EXTENSIONS-- 4zend_test 5--FILE-- 6<?php 7 8$reflectionConstant = new ReflectionClassConstant(ZendAttributeTest::class, "TEST_CONST"); 9var_dump($reflectionConstant->getAttributes()[0]->newInstance()); 10var_dump($reflectionConstant->getAttributes()[1]->newInstance()); 11 12$reflectionProperty = new ReflectionProperty(ZendAttributeTest::class, "testProp"); 13var_dump($reflectionProperty->getAttributes()[0]->newInstance()); 14var_dump($reflectionProperty->getAttributes()[1]->newInstance()); 15 16$reflectionMethod = new ReflectionMethod(ZendAttributeTest::class, "testMethod"); 17var_dump($reflectionMethod->getAttributes()[0]->newInstance()); 18 19?> 20--EXPECTF-- 21object(ZendTestRepeatableAttribute)#%d (%d) { 22} 23object(ZendTestRepeatableAttribute)#%d (%d) { 24} 25object(ZendTestRepeatableAttribute)#%d (%d) { 26} 27object(ZendTestPropertyAttribute)#%d (%d) { 28 ["parameter"]=> 29 string(%d) "testProp" 30} 31object(ZendTestAttribute)#%d (%d) { 32} 33