y() 공개 메소드

public y ( )
예제 #1
0
 function __construct()
 {
     a::y();
     b::y();
     c::y();
     d::y();
     a::$x;
     b::$x;
     c::$x;
     d::$x;
     a::$xpr;
     b::$xpr;
     c::$xpr;
     d::$xpr;
 }
예제 #2
0
    public $x = 2;
    function y()
    {
        SELF::definedInParent();
        SELF::definedInParentParent();
        SELF::undefined();
        SELF::definedinStatic();
        SELF::$pdefinedInParent;
        SELF::$pdefinedInParentParent;
        SELF::$pundefined;
        SELF::$pdefinedinStatic;
    }
    function definedinStatic()
    {
        print __METHOD__ . "\n";
    }
    private $pdefinedinStatic;
}
class c
{
    private $x = 1;
    function definedInParentParent()
    {
        print __METHOD__ . "\n";
    }
    private $pdefinedInParentParent;
}
$b = new b();
//print a::$x
print $b->y();