xref: /php-src/ext/zend_test/tests/gh9871.phpt (revision e7462bff)
1--TEST--
2Test observing inherited internal functions
3--EXTENSIONS--
4zend_test
5--INI--
6opcache.enable_cli=1
7zend_test.observer.enabled=1
8zend_test.observer.show_output=1
9zend_test.observer.observe_all=1
10zend_test.observer.show_return_value=1
11--FILE--
12<?php
13
14class MyReflectionProperty extends ReflectionProperty {
15}
16
17class A {
18    protected $protected = 'a';
19}
20
21$property = new MyReflectionProperty('A', 'protected');
22$property->setAccessible(true);
23
24?>
25--EXPECTF--
26<!-- init '%s' -->
27<file '%s'>
28  <!-- init ReflectionProperty::__construct() -->
29  <ReflectionProperty::__construct>
30  </ReflectionProperty::__construct:NULL>
31  <!-- init ReflectionProperty::setAccessible() -->
32  <ReflectionProperty::setAccessible>
33  </ReflectionProperty::setAccessible:NULL>
34</file '%s'>
35