3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Ancestor { public $publicVar = "ancestor's public var\n"; static $staticVar = "ancestor's static var\n"; function publicMethod(){ echo "ancestor's publicMethod "; // is $this is set up if(isset($this)){ echo 'is in object context. get_class($this):'.get_class($this).". get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; }else{ echo "is in static context. get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; } } static function staticMethod(){ echo "ancestor's staticMethod "; // is $this is set up if(isset($this)){ echo 'in object context. get_class($this):'.get_class($this).". get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; }else{ echo "in static context. get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; } } function publicMethodDeclaredInAncestor(){ echo "publicMethodDeclaredInAncestor "; // is $this is set up if(isset($this)){ echo 'is in object context. get_class($this):'.get_class($this).". get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; }else{ echo "is in static context. get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; } } static function staticMethodDeclaredInAncestor(){ echo "staticMethodDeclaredInAncestor "; // is $this is set up if(isset($this)){ echo 'in object context. get_class($this):'.get_class($this).". get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; }else{ echo "in static context. get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; } } } class Descendant extends Ancestor { public $publicVar = "descendant's public var\n"; static $staticVar = "descendant's static var\n"; function publicMethod(){ echo "descendant's publicMethod "; // is $this is set up if(isset($this)){ echo 'in object context. get_class($this):'.get_class($this).". get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; }else{ echo "in static context. get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; } } static function staticMethod(){ echo "descendant's staticMethod "; // is $this is set up if(isset($this)){ echo 'in object context. get_class($this):'.get_class($this).". get_class():".get_class().". __CLASS__:".__CLASS__.". \n"; }else{ echo "in static context. get_class(self):".get_class(self).". __CLASS__:".__CLASS__.".\n"; } } function publicMethodDeclaredInDescendant(){ echo "publicMethodDeclaredInDescendant "; // is $this is set up if(isset($this)){ echo 'in object context. get_class($this):'.get_class($this).". get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; }else{ echo "in static context. get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; } } static function staticMethodDeclaredInDescendant(){ echo "staticMethodDeclaredInDescendant "; // is $this is set up if(isset($this)){ echo 'in object context. get_class($this):'.get_class($this).". get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; }else{ echo "in static context. get_class():".get_class().". __CLASS__:".__CLASS__.".\n"; } } function callToPropertiesFromPublicContext(){ echo $this->publicVar; // descendant's public var //echo $this->staticVar; // "" + notice: Undefined property: Descendant::$staticVar //echo $this::$publicVar; // fatal error: Access to undeclared static property: Descendant::$publicVar echo $this::$staticVar; // descendant's static var //echo Descendant::$publicVar; // fatal error: Access to undeclared static property: Descendant::$publicVar echo Descendant::$staticVar; // descendant's static var } static function callToPropertiesFromStaticContext(){ //echo Descendant::$publicVar; // fatal error: Access to undeclared static property: Descendant::$publicVar echo Descendant::$staticVar; // descendant's static var } function callMethodsFromPublicContext() { $this->publicMethod(); // descendant's publicMethod in object context $this->staticMethod(); // descendant's staticMethod in static context $this::publicMethod(); // descendant's publicMethod in object context $this::staticMethod(); // descendant's staticMethod in static context Descendant::publicMethod(); // descendant's publicMethod in object context Descendant::staticMethod(); // descendant's staticMethod in static context } static function callMethodsFromStaticContext() { Descendant::publicMethod(); // descendant's publicMethod in static context (deprecated) Descendant::staticMethod(); // descendant's staticMethod in static context } function callWithSelfFromPublicContext() { self::publicMethod(); self::publicMethodDeclaredInAncestor(); self::publicMethodDeclaredInDescendant(); self::staticMethod(); self::staticMethodDeclaredInAncestor(); self::staticMethodDeclaredInDescendant(); } static function callWithSelfFromStaticContext() { self::publicMethod(); self::publicMethodDeclaredInAncestor(); self::publicMethodDeclaredInDescendant(); self::staticMethod(); self::staticMethodDeclaredInAncestor(); self::staticMethodDeclaredInDescendant(); } } $ancestor = new Ancestor(); $descendant = new Descendant(); echo "\n1. From Outside Of An Instance/Class:\n"; echo "\n----- 1.1 access to properties -----\n"; echo $descendant->publicVar; // descendant's public var //echo $descendant->staticVar; // "" + notice: Undefined property: Descendant::$staticVar //echo $descendant::$publicVar; // fatal error: Access to undeclared static property: Descendant::$publicVar echo $descendant::$staticVar; // descendant's static var //echo Descendant::$publicVar; // fatal error: Access to undeclared static property echo Descendant::$staticVar; // descendant's static var echo "\n----- 1.2 access to methods -----\n"; $descendant->publicMethod(); // descendant's publicMethod in object context $descendant->staticMethod(); // descendant's staticMethod in static context $descendant::publicMethod(); // descendant's publicMethod in static context (deprecated) $descendant::staticMethod(); // descendant's staticMethod in static context Descendant::publicMethod(); // descendant's publicMethod in static context (deprecated) Descendant::staticMethod(); // descendant's staticMethod in static context echo "\n2. From Inside Of An Instance/Class:\n"; echo "\n----- 2.1 access to properties from public context -----\n"; $descendant->callToPropertiesFromPublicContext(); //echo $this->publicVar; // descendant's public var //echo $this->staticVar; // "" + notice: Undefined property: Descendant::$staticVar //echo $this::$publicVar; // fatal error: Access to undeclared static property: Descendant::$publicVar //echo $this::$staticVar; // descendant's static var // //echo Descendant::$publicVar; // fatal error: Access to undeclared static property: Descendant::$publicVar //echo Descendant::$staticVar; // descendant's static var echo "\n----- 2.2 access to properties from static context -----\n"; $descendant->callToPropertiesFromStaticContext(); //echo Descendant::$publicVar; // fatal error: Access to undeclared static property: Descendant::$publicVar //echo Descendant::$staticVar; // descendant's static var echo "\n----- 2.3 access to methods from public context -----\n"; $descendant->callMethodsFromPublicContext(); //$this->publicMethod(); // descendant's publicMethod in object context //$this->staticMethod(); // descendant's staticMethod in static context //$this::publicMethod(); // descendant's publicMethod in object context //$this::staticMethod(); // descendant's staticMethod in static context // //Descendant::publicMethod(); // descendant's publicMethod in object context //Descendant::staticMethod(); // descendant's staticMethod in static context echo "\n----- 2.4 access to methods from static context -----\n"; $descendant->callMethodsFromStaticContext(); //Descendant::publicMethod(); // descendant's publicMethod in static context (deprecated) //Descendant::staticMethod(); // descendant's staticMethod in static context echo "\n3. From Inside with 'forwarding calls' :\n"; echo "\n----- 3.1 self from public context -----\n"; $descendant->callWithSelfFromPublicContext(); // self::publicMethod(); // // self::publicMethodDeclaredInAncestor(); // self::publicMethodDeclaredInDescendant(); // self::staticMethod(); // self::staticMethodDeclaredInAncestor(); // self::staticMethodDeclaredInDescendant(); // descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. // publicMethodDeclaredInAncestor is in object context. get_class($this):Descendant. get_class():Ancestor. __CLASS__:Ancestor. // publicMethodDeclaredInDescendant in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. // descendant's staticMethod in static context. get_class():Descendant. __CLASS__:Descendant. // staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. // staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. echo "\n----- 3.2 self from static context -----\n"; Descendant::callWithSelfFromStaticContext(); // self::publicMethod(); // self::publicMethodDeclaredInAncestor(); // self::publicMethodDeclaredInDescendant(); // self::staticMethod(); // self::staticMethodDeclaredInAncestor(); // self::staticMethodDeclaredInDescendant(); // descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. // publicMethodDeclaredInAncestor is in static context. get_class():Ancestor. __CLASS__:Ancestor. // publicMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. // descendant's staticMethod in static context. get_class():Descendant. __CLASS__:Descendant. // staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. // staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. // parent // static
Output for 8.3.0 - 8.3.4
1. From Outside Of An Instance/Class: ----- 1.1 access to properties ----- descendant's public var descendant's static var descendant's static var ----- 1.2 access to methods ----- descendant's publicMethod Deprecated: Calling get_class() without arguments is deprecated in /in/fL69T on line 54 in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Fatal error: Uncaught Error: Undefined constant "self" in /in/fL69T:66 Stack trace: #0 /in/fL69T(154): Descendant::staticMethod() #1 {main} thrown in /in/fL69T on line 66
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17
1. From Outside Of An Instance/Class: ----- 1.1 access to properties ----- descendant's public var descendant's static var descendant's static var ----- 1.2 access to methods ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Fatal error: Uncaught Error: Undefined constant "self" in /in/fL69T:66 Stack trace: #0 /in/fL69T(154): Descendant::staticMethod() #1 {main} thrown in /in/fL69T on line 66
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
1. From Outside Of An Instance/Class: ----- 1.1 access to properties ----- descendant's public var descendant's static var descendant's static var ----- 1.2 access to methods ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. Deprecated: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 155 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. Deprecated: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 158 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. 2. From Inside Of An Instance/Class: ----- 2.1 access to properties from public context ----- descendant's public var descendant's static var descendant's static var ----- 2.2 access to properties from static context ----- descendant's static var ----- 2.3 access to methods from public context ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. ----- 2.4 access to methods from static context ----- Deprecated: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 116 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. 3. From Inside with 'forwarding calls' : ----- 3.1 self from public context ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. publicMethodDeclaredInAncestor is in object context. get_class($this):Descendant. get_class():Ancestor. __CLASS__:Ancestor. publicMethodDeclaredInDescendant in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. ----- 3.2 self from static context ----- Deprecated: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 130 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. Deprecated: Non-static method Ancestor::publicMethodDeclaredInAncestor() should not be called statically in /in/fL69T on line 131 publicMethodDeclaredInAncestor is in static context. get_class():Ancestor. __CLASS__:Ancestor. Deprecated: Non-static method Descendant::publicMethodDeclaredInDescendant() should not be called statically in /in/fL69T on line 132 publicMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant.
Output for 7.3.32 - 7.3.33
1. From Outside Of An Instance/Class: ----- 1.1 access to properties ----- descendant's public var descendant's static var descendant's static var ----- 1.2 access to methods ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. 2. From Inside Of An Instance/Class: ----- 2.1 access to properties from public context ----- descendant's public var descendant's static var descendant's static var ----- 2.2 access to properties from static context ----- descendant's static var ----- 2.3 access to methods from public context ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. ----- 2.4 access to methods from static context ----- descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. 3. From Inside with 'forwarding calls' : ----- 3.1 self from public context ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. publicMethodDeclaredInAncestor is in object context. get_class($this):Descendant. get_class():Ancestor. __CLASS__:Ancestor. publicMethodDeclaredInDescendant in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. ----- 3.2 self from static context ----- descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. publicMethodDeclaredInAncestor is in static context. get_class():Ancestor. __CLASS__:Ancestor. publicMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25
1. From Outside Of An Instance/Class: ----- 1.1 access to properties ----- descendant's public var descendant's static var descendant's static var ----- 1.2 access to methods ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. Deprecated: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 155 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. Deprecated: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 158 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. 2. From Inside Of An Instance/Class: ----- 2.1 access to properties from public context ----- descendant's public var descendant's static var descendant's static var ----- 2.2 access to properties from static context ----- descendant's static var ----- 2.3 access to methods from public context ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. ----- 2.4 access to methods from static context ----- Deprecated: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 116 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. 3. From Inside with 'forwarding calls' : ----- 3.1 self from public context ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. publicMethodDeclaredInAncestor is in object context. get_class($this):Descendant. get_class():Ancestor. __CLASS__:Ancestor. publicMethodDeclaredInDescendant in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. ----- 3.2 self from static context ----- Deprecated: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 130 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. Deprecated: Non-static method Ancestor::publicMethodDeclaredInAncestor() should not be called statically in /in/fL69T on line 131 publicMethodDeclaredInAncestor is in static context. get_class():Ancestor. __CLASS__:Ancestor. Deprecated: Non-static method Descendant::publicMethodDeclaredInDescendant() should not be called statically in /in/fL69T on line 132 publicMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
1. From Outside Of An Instance/Class: ----- 1.1 access to properties ----- descendant's public var descendant's static var descendant's static var ----- 1.2 access to methods ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. Strict Standards: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 155 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. Strict Standards: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 158 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. 2. From Inside Of An Instance/Class: ----- 2.1 access to properties from public context ----- descendant's public var descendant's static var descendant's static var ----- 2.2 access to properties from static context ----- descendant's static var ----- 2.3 access to methods from public context ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. ----- 2.4 access to methods from static context ----- Strict Standards: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 116 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. 3. From Inside with 'forwarding calls' : ----- 3.1 self from public context ----- descendant's publicMethod in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. publicMethodDeclaredInAncestor is in object context. get_class($this):Descendant. get_class():Ancestor. __CLASS__:Ancestor. publicMethodDeclaredInDescendant in object context. get_class($this):Descendant. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. ----- 3.2 self from static context ----- Strict Standards: Non-static method Descendant::publicMethod() should not be called statically in /in/fL69T on line 130 descendant's publicMethod in static context. get_class():Descendant. __CLASS__:Descendant. Strict Standards: Non-static method Ancestor::publicMethodDeclaredInAncestor() should not be called statically in /in/fL69T on line 131 publicMethodDeclaredInAncestor is in static context. get_class():Ancestor. __CLASS__:Ancestor. Strict Standards: Non-static method Descendant::publicMethodDeclaredInDescendant() should not be called statically in /in/fL69T on line 132 publicMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant. descendant's staticMethod Notice: Use of undefined constant self - assumed 'self' in /in/fL69T on line 66 Warning: get_class() expects parameter 1 to be object, string given in /in/fL69T on line 66 in static context. get_class(self):. __CLASS__:Descendant. staticMethodDeclaredInAncestor in static context. get_class():Ancestor. __CLASS__:Ancestor. staticMethodDeclaredInDescendant in static context. get_class():Descendant. __CLASS__:Descendant.

preferences:
246.28 ms | 413 KiB | 280 Q