3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExtendThis{ private $foobar = [1,2,3]; public function setFoobar($value) { $this->foobar = $value; } public function printItem($index){ echo($this->foobar[$index]); } } class AChild extends ExtendThis{ } $inst = new AChild; $inst->setFoobar([4,5,6]); $inst->printItem(0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gqY68
function name:  (null)
number of ops:  10
compiled vars:  !0 = $inst
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'AChild'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'setFoobar'
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0          
   20     6        INIT_METHOD_CALL                                         !0, 'printItem'
          7        SEND_VAL_EX                                              0
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function setfoobar

Function printitem:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gqY68
function name:  printItem
number of ops:  5
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        FETCH_OBJ_R                                      ~1      'foobar'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3        ECHO                                                     ~2
   11     4      > RETURN                                                   null

End of function printitem

End of class ExtendThis.

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

End of function setfoobar

Function printitem:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gqY68
function name:  printItem
number of ops:  5
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        FETCH_OBJ_R                                      ~1      'foobar'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3        ECHO                                                     ~2
   11     4      > RETURN                                                   null

End of function printitem

End of class AChild.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.2 ms | 1399 KiB | 13 Q