3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { private $name; public function greet2() { $this->greet('jan'); echo $this->name; } private function greet($name) { $this->name = $name; } } class bar extends foo { public function greet() { echo "Hello"; } } $bar = new bar; $bar->greet(); $bar->greet2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iHdg6
function name:  (null)
number of ops:  8
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_METHOD_CALL                                         !0, 'greet'
          4        DO_FCALL                                      0          
   28     5        INIT_METHOD_CALL                                         !0, 'greet2'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class foo:
Function greet2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iHdg6
function name:  greet2
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_METHOD_CALL                                         'greet'
          1        SEND_VAL_EX                                              'jan'
          2        DO_FCALL                                      0          
    9     3        FETCH_OBJ_R                                      ~1      'name'
          4        ECHO                                                     ~1
   10     5      > RETURN                                                   null

End of function greet2

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

End of function greet

End of class foo.

Class bar:
Function greet:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iHdg6
function name:  greet
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ECHO                                                     'Hello'
   23     1      > RETURN                                                   null

End of function greet

Function greet2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iHdg6
function name:  greet2
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_METHOD_CALL                                         'greet'
          1        SEND_VAL_EX                                              'jan'
          2        DO_FCALL                                      0          
    9     3        FETCH_OBJ_R                                      ~1      'name'
          4        ECHO                                                     ~1
   10     5      > RETURN                                                   null

End of function greet2

End of class bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.13 ms | 1390 KiB | 13 Q