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 publicMethod2(){ echo "ancestor's publicMethod2 "; // 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 staticMethod2(){ echo "ancestor's staticMethod2 "; // 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():".get_class().". __CLASS__:".__CLASS__.".\n"; } } function publicMethod3(){ echo "descendant's publicMethod3 "; // 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 staticMethod3(){ echo "descendant's staticMethod3 "; // 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::publicMethod2(); self::publicMethod3(); self::staticMethod(); self::staticMethod2(); self::staticMethod3(); } static function callWithSelfFromStaticContext() { self::publicMethod(); self::publicMethod2(); self::publicMethod3(); self::staticMethod(); self::staticMethod2(); self::staticMethod3(); } } $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(); echo "\n----- 3.2 self from static context -----\n"; Descendant::callWithSelfFromStaticContext(); // parent // static
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NuZ7m
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          
  193    47        ECHO                                                     '%0A-----+3.2+self+from+static+context+-----%0A'
  194    48        INIT_STATIC_METHOD_CALL                                  'Descendant', 'callWithSelfFromStaticContext'
         49        DO_FCALL                                      0          
  196    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 = 18
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NuZ7m
function name:  publicMethod
number of ops:  25
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, ->18
    9     3    >   ROPE_INIT                                     3  ~3      'is+in+object+context.+get_class%28'
          4        FETCH_THIS                                       ~1      
          5        ROPE_ADD                                      1  ~3      ~3, ~1
          6        ROPE_END                                      2  ~2      ~3, '%29%3A'
          7        FETCH_THIS                                       ~5      
          8        GET_CLASS                                        ~6      ~5
          9        CONCAT                                           ~7      ~2, ~6
         10        CONCAT                                           ~8      ~7, '.++get_class%28%29%3A'
         11        GET_CLASS                                        ~9      
         12        CONCAT                                           ~10     ~8, ~9
         13        CONCAT                                           ~11     ~10, '.++__CLASS__%3A'
         14        CONCAT                                           ~12     ~11, 'Ancestor'
         15        CONCAT                                           ~13     ~12, '.%0A'
         16        ECHO                                                     ~13
         17      > JMP                                                      ->24
   11    18    >   GET_CLASS                                        ~14     
         19        CONCAT                                           ~15     'is+in+static+context.+get_class%28%29%3A', ~14
         20        CONCAT                                           ~16     ~15, '.++__CLASS__%3A'
         21        CONCAT                                           ~17     ~16, 'Ancestor'
         22        CONCAT                                           ~18     ~17, '.%0A'
         23        ECHO                                                     ~18
   13    24    > > 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 = 18
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NuZ7m
function name:  staticMethod
number of ops:  25
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, ->18
   19     3    >   ROPE_INIT                                     3  ~3      'in+object+context.+get_class%28'
          4        FETCH_THIS                                       ~1      
          5        ROPE_ADD                                      1  ~3      ~3, ~1
          6        ROPE_END                                      2  ~2      ~3, '%29%3A'
          7        FETCH_THIS                                       ~5      
          8        GET_CLASS                                        ~6      ~5
          9        CONCAT                                           ~7      ~2, ~6
         10        CONCAT                                           ~8      ~7, '.++get_class%28%29%3A'
         11        GET_CLASS                                        ~9      
         12        CONCAT                                           ~10     ~8, ~9
         13        CONCAT                                           ~11     ~10, '.++__CLASS__%3A'
         14        CONCAT                                           ~12     ~11, 'Ancestor'
         15        CONCAT                                           ~13     ~12, '.%0A'
         16        ECHO                                                     ~13
         17      > JMP                                                      ->24
   21    18    >   GET_CLASS                                        ~14     
         19        CONCAT                                           ~15     'in+static+context.+get_class%28%29%3A', ~14
         20        CONCAT                                           ~16     ~15, '.++__CLASS__%3A'
         21        CONCAT                                           ~17     ~16, 'Ancestor'
         22        CONCAT                                           ~18     ~17, '.%0A'
         23        ECHO                                                     ~18
   23    24    > > RETURN                                                   null

End of function staticmethod

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

End of function publicmethod2

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

End of function staticmethod2

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 = 18
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NuZ7m
function name:  publicMethod
number of ops:  25
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, ->18
   54     3    >   ROPE_INIT                                     3  ~3      'in+object+context.+get_class%28'
          4        FETCH_THIS                                       ~1      
          5        ROPE_ADD                                      1  ~3      ~3, ~1
          6        ROPE_END                                      2  ~2      ~3, '%29%3A'
          7        FETCH_THIS                                       ~5      
          8        GET_CLASS                                        ~6      ~5
          9        CONCAT                                           ~7      ~2, ~6
         10        CONCAT                                           ~8      ~7, '.++get_class%28%29%3A'
         11        GET_CLASS                                        ~9      
         12        CONCAT                                           ~10     ~8, ~9
         13        CONCAT                                           ~11     ~10, '.++__CLASS__%3A'
         14        CONCAT                                           ~12     ~11, 'Descendant'
         15        CONCAT                                           ~13     ~12, '.%0A'
         16        ECHO                                                     ~13
         17      > JMP                                                      ->24
   56    18    >   GET_CLASS                                        ~14     
         19        CONCAT                                           ~15     'in+static+context.+get_class%28%29%3A', ~14
         20        CONCAT                                           ~16     ~15, '.++__CLASS__%3A'
         21        CONCAT                                           ~17     ~16, 'Descendant'
         22        CONCAT                                           ~18     ~17, '.%0A'
         23        ECHO                                                     ~18
   58    24    > > 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 = 18
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NuZ7m
function name:  staticMethod
number of ops:  25
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, ->18
   64     3    >   ROPE_INIT                                     3  ~3      'in+object+context.+get_class%28'
          4        FETCH_THIS                                       ~1      
          5        ROPE_ADD                                      1  ~3      ~3, ~1
          6        ROPE_END                                      2  ~2      ~3, '%29%3A'
          7        FETCH_THIS                                       ~5      
          8        GET_CLASS                                        ~6      ~5
          9        CONCAT                                           ~7      ~2, ~6
         10        CONCAT                                           ~8      ~7, '.++get_class%28%29%3A'
         11        GET_CLASS                                        ~9      
         12        CONCAT                                           ~10     ~8, ~9
         13        CONCAT                                           ~11     ~10, '.++__CLASS__%3A'
         14        CONCAT                                           ~12     ~11, 'Descendant'
         15        CONCAT                                           ~13     ~12, '.+%0A'
         16        ECHO                                                     ~13
         17      > JMP                                                      ->24
   66    18    >   GET_CLASS                                        ~14     
         19        CONCAT                                           ~15     'in+static+context.+get_class%28%29%3A', ~14
         20        CONCAT                                           ~16     ~15, '.++__CLASS__%3A'
         21        CONCAT                                           ~17     ~16, 'Descendant'
         22        CONCAT                                           ~18     ~17, '.%0A'
         23        ECHO                                                     ~18
   68    24    > > RETURN                                                   null

End of function staticmethod

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

End of function publicmethod3

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

End of function staticmethod3

Function calltopropertiesfrompubliccontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NuZ7m
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/NuZ7m
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/NuZ7m
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/NuZ7m
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                 

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.3 ms | 1427 KiB | 13 Q