コード例 #1
0
<?php

trait T
{
    private $x = 0;
}
class X
{
    use T;
}
class Y extends X
{
    use T;
    function __construct()
    {
        return ++$this->x;
    }
}
class Z extends Y
{
    function __construct()
    {
        return ++$this->x;
    }
}
$a = new Z();
$a->__construct();
echo "DONE";
コード例 #2
0
ファイル: ZOption.php プロジェクト: youthweb/bbcode-parser
 public function __construct()
 {
     parent::__construct();
     $this->useOption = true;
 }