xref: /PHP-8.4/Zend/tests/bug70156.phpt (revision de6e401e)
1--TEST--
2Bug #70156 (Segfault in zend_find_alias_name)
3--FILE--
4<?php
5trait T1 {
6    protected function foo1()
7    {
8        $this->bar();
9    }
10}
11
12trait T2 {
13    protected function foo2()
14    {
15        debug_print_backtrace();
16    }
17}
18
19class dummy {
20    use T1 {
21        foo1 as private;
22    }
23    use T2 {
24        foo2 as bar;
25    }
26    public function __construct()
27    {
28        $this->foo1();
29    }
30}
31
32new dummy();
33?>
34--EXPECTF--
35#0 %s(%d): dummy->bar()
36#1 %s(%d): dummy->foo1()
37#2 %s(%d): dummy->__construct()
38