xref: /PHP-8.0/Zend/tests/bug70156.phpt (revision f8d79582)
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  dummy->bar() called at [%sbug70156.php:%d]
36#1  dummy->foo1() called at [%sbug70156.php:%d]
37#2  dummy->__construct() called at [%sbug70156.php:%d]
38