1--TEST-- 2Bug #81430 (Attribute instantiation frame accessing invalid frame pointer) 3--EXTENSIONS-- 4zend_test 5--INI-- 6memory_limit=20M 7zend_test.observer.enabled=1 8zend_test.observer.show_output=1 9zend_test.observer.observe_all=1 10--FILE-- 11<?php 12 13#[\Attribute] 14class A { 15 private $a; 16 public function __construct() { 17 } 18} 19 20#[A] 21function B() {} 22 23$r = new \ReflectionFunction("B"); 24call_user_func([$r->getAttributes(A::class)[0], 'newInstance']); 25?> 26--EXPECTF-- 27<!-- init '%s' --> 28<file '%s'> 29 <!-- init ReflectionFunction::__construct() --> 30 <ReflectionFunction::__construct> 31 </ReflectionFunction::__construct> 32 <!-- init ReflectionFunctionAbstract::getAttributes() --> 33 <ReflectionFunctionAbstract::getAttributes> 34 </ReflectionFunctionAbstract::getAttributes> 35 <!-- init ReflectionAttribute::newInstance() --> 36 <ReflectionAttribute::newInstance> 37 <!-- init A::__construct() --> 38 <A::__construct> 39 </A::__construct> 40 </ReflectionAttribute::newInstance> 41</file '%s'>