xref: /PHP-8.2/ext/zend_test/tests/gh16233.phpt (revision e715dd0a)
1--TEST--
2GH-16233 (Observer segfault when calling user function in internal function via trampoline)
3--EXTENSIONS--
4zend_test
5--INI--
6zend_test.observer.enabled=1
7zend_test.observer.show_output=1
8zend_test.observer.observe_all=1
9--FILE--
10<?php
11
12function callee() {
13    echo "in callee\n";
14}
15
16$test = new _ZendTestMagicCallForward;
17$test->callee();
18echo "done\n";
19
20?>
21--EXPECTF--
22<!-- init '%sgh16233.php' -->
23<file '%sgh16233.php'>
24  <!-- init _ZendTestMagicCallForward::__call() -->
25  <_ZendTestMagicCallForward::__call>
26    <!-- init callee() -->
27    <callee>
28in callee
29    </callee>
30  </_ZendTestMagicCallForward::__call>
31done
32</file '%sgh16233.php'>
33