xref: /PHP-8.2/Zend/tests/bug60536_001.phpt (revision 902d6439)
1--TEST--
2Bug #60536 (Traits Segfault)
3--FILE--
4<?php
5trait T { private $x = 0; }
6class X {
7    use T;
8}
9class Y extends X {
10      use T;
11      function __construct() {
12          return ++$this->x;
13      }
14}
15#[AllowDynamicProperties]
16class Z extends Y {
17      function __construct() {
18          return ++$this->x;
19      }
20}
21$a = new Z();
22$a->__construct();
23echo "DONE";
24?>
25--EXPECTF--
26Warning: Undefined property: Z::$x in %s on line %d
27DONE
28