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(self):".get_class(self).". __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():".get_class().". __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
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  (null)
number of ops:  51
compiled vars:  !0 = $ancestor, !1 = $descendant
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  139     0  E >   NEW                                              $2      'Ancestor'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
  140     3        NEW                                              $5      'Descendant'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
  142     6        ECHO                                                     '%0A1.+From+Outside+Of+An+Instance%2FClass%3A%0A'
  143     7        ECHO                                                     '%0A-----+1.1+access+to+properties+-----%0A'
  144     8        FETCH_OBJ_R                                      ~8      !1, 'publicVar'
          9        ECHO                                                     ~8
  147    10        FETCH_CLASS                                   0  $9      !1
         11        FETCH_STATIC_PROP_R          unknown             ~10     'staticVar'
         12        ECHO                                                     ~10
  150    13        FETCH_STATIC_PROP_R          unknown             ~11     'staticVar'
         14        ECHO                                                     ~11
  152    15        ECHO                                                     '%0A-----+1.2+access+to+methods+-----%0A'
  153    16        INIT_METHOD_CALL                                         !1, 'publicMethod'
         17        DO_FCALL                                      0          
  154    18        INIT_METHOD_CALL                                         !1, 'staticMethod'
         19        DO_FCALL                                      0          
  155    20        FETCH_CLASS                                   0  $14     !1
         21        INIT_STATIC_METHOD_CALL                                  $14, 'publicMethod'
         22        DO_FCALL                                      0          
  156    23        FETCH_CLASS                                   0  $16     !1
         24        INIT_STATIC_METHOD_CALL                                  $16, 'staticMethod'
         25        DO_FCALL                                      0          
  158    26        INIT_STATIC_METHOD_CALL                                  'Descendant', 'publicMethod'
         27        DO_FCALL                                      0          
  159    28        INIT_STATIC_METHOD_CALL                                  'Descendant', 'staticMethod'
         29        DO_FCALL                                      0          
  161    30        ECHO                                                     '%0A2.+From+Inside+Of+An+Instance%2FClass%3A%0A'
  162    31        ECHO                                                     '%0A-----+2.1+access+to+properties+from+public+context+-----%0A'
  163    32        INIT_METHOD_CALL                                         !1, 'callToPropertiesFromPublicContext'
         33        DO_FCALL                                      0          
  171    34        ECHO                                                     '%0A-----+2.2+access+to+properties+from+static+context+-----%0A'
  172    35        INIT_METHOD_CALL                                         !1, 'callToPropertiesFromStaticContext'
         36        DO_FCALL                                      0          
  176    37        ECHO                                                     '%0A-----+2.3+access+to+methods+from+public+context+-----%0A'
  177    38        INIT_METHOD_CALL                                         !1, 'callMethodsFromPublicContext'
         39        DO_FCALL                                      0          
  185    40        ECHO                                                     '%0A-----+2.4+access+to+methods+from+static+context+-----%0A'
  186    41        INIT_METHOD_CALL                                         !1, 'callMethodsFromStaticContext'
         42        DO_FCALL                                      0          
  190    43        ECHO                                                     '%0A3.+From+Inside+with+%27forwarding+calls%27+%3A%0A'
  191    44        ECHO                                                     '%0A-----+3.1+self+from+public+context+-----%0A'
  192    45        INIT_METHOD_CALL                                         !1, 'callWithSelfFromPublicContext'
         46        DO_FCALL                                      0          
  205    47        ECHO                                                     '%0A-----+3.2+self+from+static+context+-----%0A'
  206    48        INIT_STATIC_METHOD_CALL                                  'Descendant', 'callWithSelfFromStaticContext'
         49        DO_FCALL                                      0          
  220    50      > RETURN                                                   1

Class Ancestor:
Function publicmethod:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  publicMethod
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'ancestor%27s+publicMethod+'
    8     1        ISSET_ISEMPTY_THIS                               ~0      
          2      > JMPZ                                                     ~0, ->14
    9     3    >   FETCH_THIS                                       ~1      
          4        GET_CLASS                                        ~2      ~1
          5        CONCAT                                           ~3      'is+in+object+context.+get_class%28%24this%29%3A', ~2
          6        CONCAT                                           ~4      ~3, '.++get_class%28%29%3A'
          7        GET_CLASS                                        ~5      
          8        CONCAT                                           ~6      ~4, ~5
          9        CONCAT                                           ~7      ~6, '.++__CLASS__%3A'
         10        CONCAT                                           ~8      ~7, 'Ancestor'
         11        CONCAT                                           ~9      ~8, '.%0A'
         12        ECHO                                                     ~9
         13      > JMP                                                      ->20
   11    14    >   GET_CLASS                                        ~10     
         15        CONCAT                                           ~11     'is+in+static+context.+get_class%28%29%3A', ~10
         16        CONCAT                                           ~12     ~11, '.++__CLASS__%3A'
         17        CONCAT                                           ~13     ~12, 'Ancestor'
         18        CONCAT                                           ~14     ~13, '.%0A'
         19        ECHO                                                     ~14
   13    20    > > RETURN                                                   null

End of function publicmethod

Function staticmethod:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  staticMethod
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     'ancestor%27s+staticMethod+'
   18     1        ISSET_ISEMPTY_THIS                               ~0      
          2      > JMPZ                                                     ~0, ->14
   19     3    >   FETCH_THIS                                       ~1      
          4        GET_CLASS                                        ~2      ~1
          5        CONCAT                                           ~3      'in+object+context.+get_class%28%24this%29%3A', ~2
          6        CONCAT                                           ~4      ~3, '.++get_class%28%29%3A'
          7        GET_CLASS                                        ~5      
          8        CONCAT                                           ~6      ~4, ~5
          9        CONCAT                                           ~7      ~6, '.++__CLASS__%3A'
         10        CONCAT                                           ~8      ~7, 'Ancestor'
         11        CONCAT                                           ~9      ~8, '.%0A'
         12        ECHO                                                     ~9
         13      > JMP                                                      ->20
   21    14    >   GET_CLASS                                        ~10     
         15        CONCAT                                           ~11     'in+static+context.+get_class%28%29%3A', ~10
         16        CONCAT                                           ~12     ~11, '.++__CLASS__%3A'
         17        CONCAT                                           ~13     ~12, 'Ancestor'
         18        CONCAT                                           ~14     ~13, '.%0A'
         19        ECHO                                                     ~14
   23    20    > > RETURN                                                   null

End of function staticmethod

Function publicmethoddeclaredinancestor:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  publicMethodDeclaredInAncestor
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   ECHO                                                     'publicMethodDeclaredInAncestor+'
   28     1        ISSET_ISEMPTY_THIS                               ~0      
          2      > JMPZ                                                     ~0, ->14
   29     3    >   FETCH_THIS                                       ~1      
          4        GET_CLASS                                        ~2      ~1
          5        CONCAT                                           ~3      'is+in+object+context.+get_class%28%24this%29%3A', ~2
          6        CONCAT                                           ~4      ~3, '.++get_class%28%29%3A'
          7        GET_CLASS                                        ~5      
          8        CONCAT                                           ~6      ~4, ~5
          9        CONCAT                                           ~7      ~6, '.++__CLASS__%3A'
         10        CONCAT                                           ~8      ~7, 'Ancestor'
         11        CONCAT                                           ~9      ~8, '.%0A'
         12        ECHO                                                     ~9
         13      > JMP                                                      ->20
   31    14    >   GET_CLASS                                        ~10     
         15        CONCAT                                           ~11     'is+in+static+context.+get_class%28%29%3A', ~10
         16        CONCAT                                           ~12     ~11, '.++__CLASS__%3A'
         17        CONCAT                                           ~13     ~12, 'Ancestor'
         18        CONCAT                                           ~14     ~13, '.%0A'
         19        ECHO                                                     ~14
   33    20    > > RETURN                                                   null

End of function publicmethoddeclaredinancestor

Function staticmethoddeclaredinancestor:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  staticMethodDeclaredInAncestor
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   ECHO                                                     'staticMethodDeclaredInAncestor+'
   38     1        ISSET_ISEMPTY_THIS                               ~0      
          2      > JMPZ                                                     ~0, ->14
   39     3    >   FETCH_THIS                                       ~1      
          4        GET_CLASS                                        ~2      ~1
          5        CONCAT                                           ~3      'in+object+context.+get_class%28%24this%29%3A', ~2
          6        CONCAT                                           ~4      ~3, '.++get_class%28%29%3A'
          7        GET_CLASS                                        ~5      
          8        CONCAT                                           ~6      ~4, ~5
          9        CONCAT                                           ~7      ~6, '.++__CLASS__%3A'
         10        CONCAT                                           ~8      ~7, 'Ancestor'
         11        CONCAT                                           ~9      ~8, '.%0A'
         12        ECHO                                                     ~9
         13      > JMP                                                      ->20
   41    14    >   GET_CLASS                                        ~10     
         15        CONCAT                                           ~11     'in+static+context.+get_class%28%29%3A', ~10
         16        CONCAT                                           ~12     ~11, '.++__CLASS__%3A'
         17        CONCAT                                           ~13     ~12, 'Ancestor'
         18        CONCAT                                           ~14     ~13, '.%0A'
         19        ECHO                                                     ~14
   43    20    > > RETURN                                                   null

End of function staticmethoddeclaredinancestor

End of class Ancestor.

Class Descendant:
Function publicmethod:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  publicMethod
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   51     0  E >   ECHO                                                     'descendant%27s+publicMethod+'
   53     1        ISSET_ISEMPTY_THIS                               ~0      
          2      > JMPZ                                                     ~0, ->14
   54     3    >   FETCH_THIS                                       ~1      
          4        GET_CLASS                                        ~2      ~1
          5        CONCAT                                           ~3      'in+object+context.+get_class%28%24this%29%3A', ~2
          6        CONCAT                                           ~4      ~3, '.++get_class%28%29%3A'
          7        GET_CLASS                                        ~5      
          8        CONCAT                                           ~6      ~4, ~5
          9        CONCAT                                           ~7      ~6, '.++__CLASS__%3A'
         10        CONCAT                                           ~8      ~7, 'Descendant'
         11        CONCAT                                           ~9      ~8, '.%0A'
         12        ECHO                                                     ~9
         13      > JMP                                                      ->21
   56    14    >   FETCH_CONSTANT                                   ~10     'self'
         15        GET_CLASS                                        ~11     ~10
         16        CONCAT                                           ~12     'in+static+context.+get_class%28self%29%3A', ~11
         17        CONCAT                                           ~13     ~12, '.++__CLASS__%3A'
         18        CONCAT                                           ~14     ~13, 'Descendant'
         19        CONCAT                                           ~15     ~14, '.%0A'
         20        ECHO                                                     ~15
   58    21    > > RETURN                                                   null

End of function publicmethod

Function staticmethod:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  staticMethod
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   61     0  E >   ECHO                                                     'descendant%27s+staticMethod+'
   63     1        ISSET_ISEMPTY_THIS                               ~0      
          2      > JMPZ                                                     ~0, ->14
   64     3    >   FETCH_THIS                                       ~1      
          4        GET_CLASS                                        ~2      ~1
          5        CONCAT                                           ~3      'in+object+context.+get_class%28%24this%29%3A', ~2
          6        CONCAT                                           ~4      ~3, '.++get_class%28%29%3A'
          7        GET_CLASS                                        ~5      
          8        CONCAT                                           ~6      ~4, ~5
          9        CONCAT                                           ~7      ~6, '.++__CLASS__%3A'
         10        CONCAT                                           ~8      ~7, 'Descendant'
         11        CONCAT                                           ~9      ~8, '.+%0A'
         12        ECHO                                                     ~9
         13      > JMP                                                      ->20
   66    14    >   GET_CLASS                                        ~10     
         15        CONCAT                                           ~11     'in+static+context.+get_class%28%29%3A', ~10
         16        CONCAT                                           ~12     ~11, '.++__CLASS__%3A'
         17        CONCAT                                           ~13     ~12, 'Descendant'
         18        CONCAT                                           ~14     ~13, '.%0A'
         19        ECHO                                                     ~14
   68    20    > > RETURN                                                   null

End of function staticmethod

Function publicmethoddeclaredindescendant:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  publicMethodDeclaredInDescendant
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   71     0  E >   ECHO                                                     'publicMethodDeclaredInDescendant+'
   73     1        ISSET_ISEMPTY_THIS                               ~0      
          2      > JMPZ                                                     ~0, ->14
   74     3    >   FETCH_THIS                                       ~1      
          4        GET_CLASS                                        ~2      ~1
          5        CONCAT                                           ~3      'in+object+context.+get_class%28%24this%29%3A', ~2
          6        CONCAT                                           ~4      ~3, '.++get_class%28%29%3A'
          7        GET_CLASS                                        ~5      
          8        CONCAT                                           ~6      ~4, ~5
          9        CONCAT                                           ~7      ~6, '.++__CLASS__%3A'
         10        CONCAT                                           ~8      ~7, 'Descendant'
         11        CONCAT                                           ~9      ~8, '.%0A'
         12        ECHO                                                     ~9
         13      > JMP                                                      ->20
   76    14    >   GET_CLASS                                        ~10     
         15        CONCAT                                           ~11     'in+static+context.+get_class%28%29%3A', ~10
         16        CONCAT                                           ~12     ~11, '.++__CLASS__%3A'
         17        CONCAT                                           ~13     ~12, 'Descendant'
         18        CONCAT                                           ~14     ~13, '.%0A'
         19        ECHO                                                     ~14
   78    20    > > RETURN                                                   null

End of function publicmethoddeclaredindescendant

Function staticmethoddeclaredindescendant:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  staticMethodDeclaredInDescendant
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   81     0  E >   ECHO                                                     'staticMethodDeclaredInDescendant+'
   83     1        ISSET_ISEMPTY_THIS                               ~0      
          2      > JMPZ                                                     ~0, ->14
   84     3    >   FETCH_THIS                                       ~1      
          4        GET_CLASS                                        ~2      ~1
          5        CONCAT                                           ~3      'in+object+context.+get_class%28%24this%29%3A', ~2
          6        CONCAT                                           ~4      ~3, '.++get_class%28%29%3A'
          7        GET_CLASS                                        ~5      
          8        CONCAT                                           ~6      ~4, ~5
          9        CONCAT                                           ~7      ~6, '.++__CLASS__%3A'
         10        CONCAT                                           ~8      ~7, 'Descendant'
         11        CONCAT                                           ~9      ~8, '.%0A'
         12        ECHO                                                     ~9
         13      > JMP                                                      ->20
   86    14    >   GET_CLASS                                        ~10     
         15        CONCAT                                           ~11     'in+static+context.+get_class%28%29%3A', ~10
         16        CONCAT                                           ~12     ~11, '.++__CLASS__%3A'
         17        CONCAT                                           ~13     ~12, 'Descendant'
         18        CONCAT                                           ~14     ~13, '.%0A'
         19        ECHO                                                     ~14
   88    20    > > RETURN                                                   null

End of function staticmethoddeclaredindescendant

Function calltopropertiesfrompubliccontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  callToPropertiesFromPublicContext
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   91     0  E >   FETCH_OBJ_R                                      ~0      'publicVar'
          1        ECHO                                                     ~0
   94     2        FETCH_THIS                                       ~1      
          3        FETCH_CLASS                                   0  $2      ~1
          4        FETCH_STATIC_PROP_R          unknown             ~3      'staticVar'
          5        ECHO                                                     ~3
   96     6        FETCH_STATIC_PROP_R          unknown             ~4      'staticVar'
          7        ECHO                                                     ~4
   97     8      > RETURN                                                   null

End of function calltopropertiesfrompubliccontext

Function calltopropertiesfromstaticcontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  callToPropertiesFromStaticContext
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  100     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'staticVar'
          1        ECHO                                                     ~0
  101     2      > RETURN                                                   null

End of function calltopropertiesfromstaticcontext

Function callmethodsfrompubliccontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  callMethodsFromPublicContext
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  105     0  E >   INIT_METHOD_CALL                                         'publicMethod'
          1        DO_FCALL                                      0          
  106     2        INIT_METHOD_CALL                                         'staticMethod'
          3        DO_FCALL                                      0          
  107     4        FETCH_THIS                                       ~2      
          5        FETCH_CLASS                                   0  $3      ~2
          6        INIT_STATIC_METHOD_CALL                                  $3, 'publicMethod'
          7        DO_FCALL                                      0          
  108     8        FETCH_THIS                                       ~5      
          9        FETCH_CLASS                                   0  $6      ~5
         10        INIT_STATIC_METHOD_CALL                                  $6, 'staticMethod'
         11        DO_FCALL                                      0          
  110    12        INIT_STATIC_METHOD_CALL                                  'Descendant', 'publicMethod'
         13        DO_FCALL                                      0          
  111    14        INIT_STATIC_METHOD_CALL                                  'Descendant', 'staticMethod'
         15        DO_FCALL                                      0          
  113    16      > RETURN                                                   null

End of function callmethodsfrompubliccontext

Function callmethodsfromstaticcontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  callMethodsFromStaticContext
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  116     0  E >   INIT_STATIC_METHOD_CALL                                  'Descendant', 'publicMethod'
          1        DO_FCALL                                      0          
  117     2        INIT_STATIC_METHOD_CALL                                  'Descendant', 'staticMethod'
          3        DO_FCALL                                      0          
  118     4      > RETURN                                                   null

End of function callmethodsfromstaticcontext

Function callwithselffrompubliccontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  callWithSelfFromPublicContext
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  121     0  E >   INIT_STATIC_METHOD_CALL                                  'publicMethod'
          1        DO_FCALL                                      0          
  122     2        INIT_STATIC_METHOD_CALL                                  'publicMethodDeclaredInAncestor'
          3        DO_FCALL                                      0          
  123     4        INIT_STATIC_METHOD_CALL                                  'publicMethodDeclaredInDescendant'
          5        DO_FCALL                                      0          
  124     6        INIT_STATIC_METHOD_CALL                                  'staticMethod'
          7        DO_FCALL                                      0          
  125     8        INIT_STATIC_METHOD_CALL                                  'staticMethodDeclaredInAncestor'
          9        DO_FCALL                                      0          
  126    10        INIT_STATIC_METHOD_CALL                                  'staticMethodDeclaredInDescendant'
         11        DO_FCALL                                      0          
  127    12      > RETURN                                                   null

End of function callwithselffrompubliccontext

Function callwithselffromstaticcontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgLVQ
function name:  callWithSelfFromStaticContext
number of ops:  13
compiled vars:  none
line      #* 

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.32 ms | 1427 KiB | 13 Q