php-src/Zend/tests/bug60536_001.phpt

28 lines
394 B
Plaintext
Raw Normal View History

--TEST--
Bug #60536 (Traits Segfault)
--FILE--
<?php
trait T { private $x = 0; }
2013-02-19 07:01:42 +00:00
class X {
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;
}
}
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;
}
}
$a = new Z();
2015-03-31 14:10:22 +00:00
$a->__construct();
echo "DONE";
?>
--EXPECTF--
2013-02-19 07:01:42 +00:00
Notice: Undefined property: Z::$x in %s on line 14
DONE