3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { private $s; public function __construct($s) { $this->s = $s; } protected function getS() { return $this->s; } } class C1 extends C { public function __construct($s) { parent::__construct($s); } function do() { echo $this->getS(); echo $this->s; } } $c1 = new C1(); $c1->do();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ACgND
function name:  (null)
number of ops:  6
compiled vars:  !0 = $c1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'C1'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'do'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class C:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ACgND
function name:  __construct
number of ops:  4
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN_OBJ                                               's'
          2        OP_DATA                                                  !0
    7     3      > RETURN                                                   null

End of function __construct

Function gets:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ACgND
function name:  getS
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      's'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function gets

End of class C.

Class C1:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ACgND
function name:  __construct
number of ops:  5
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   16     4      > RETURN                                                   null

End of function __construct

Function do:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ACgND
function name:  do
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_METHOD_CALL                                         'getS'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   19     3        FETCH_OBJ_R                                      ~1      's'
          4        ECHO                                                     ~1
   20     5      > RETURN                                                   null

End of function do

Function gets:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ACgND
function name:  getS
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      's'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function gets

End of class C1.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.71 ms | 1399 KiB | 13 Q