mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
28 lines
364 B
PHP
28 lines
364 B
PHP
--TEST--
|
|
Bug #60536 (Traits Segfault)
|
|
--FILE--
|
|
<?php
|
|
trait T { private $x = 0; }
|
|
class X {
|
|
use T;
|
|
}
|
|
class Y extends X {
|
|
use T;
|
|
function x() {
|
|
return ++$this->x;
|
|
}
|
|
}
|
|
class Z extends Y {
|
|
function z() {
|
|
return ++$this->x;
|
|
}
|
|
}
|
|
$a = new Z();
|
|
$a->x();
|
|
echo "DONE";
|
|
?>
|
|
--EXPECTF--
|
|
|
|
Notice: Undefined property: Z::$x in %s on line 14
|
|
DONE
|