2011-12-16 19:02:52 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #60536 (Traits Segfault)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
trait T { private $x = 0; }
|
2013-02-19 07:01:42 +00:00
|
|
|
class X {
|
2011-12-16 19:02:52 +00:00
|
|
|
use T;
|
|
|
|
}
|
|
|
|
class Y extends X {
|
|
|
|
use T;
|
2015-03-31 14:10:22 +00:00
|
|
|
function __construct() {
|
2013-02-19 07:01:42 +00:00
|
|
|
return ++$this->x;
|
2011-12-16 19:02:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
class Z extends Y {
|
2015-03-31 14:10:22 +00:00
|
|
|
function __construct() {
|
2013-02-19 07:01:42 +00:00
|
|
|
return ++$this->x;
|
2011-12-16 19:02:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
$a = new Z();
|
2015-03-31 14:10:22 +00:00
|
|
|
$a->__construct();
|
2011-12-16 19:02:52 +00:00
|
|
|
echo "DONE";
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2013-02-19 07:01:42 +00:00
|
|
|
|
2013-04-09 21:49:02 +00:00
|
|
|
Notice: Undefined property: Z::$x in %s on line 14
|
2011-12-16 19:02:52 +00:00
|
|
|
DONE
|