3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); ini_set('display_errors',1); class foo { private function do_something () { echo('foo'); } public function print_string () { $this->do_something(); } } class bar extends foo { public function do_something () { echo('baz'); } } $b=new bar(); $b->do_something(); $b->print_string(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WFpm0
function name:  (null)
number of ops:  15
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    5     3        INIT_FCALL                                               'ini_set'
          4        SEND_VAL                                                 'display_errors'
          5        SEND_VAL                                                 1
          6        DO_ICALL                                                 
   33     7        NEW                                              $3      'bar'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $3
   34    10        INIT_METHOD_CALL                                         !0, 'do_something'
         11        DO_FCALL                                      0          
   35    12        INIT_METHOD_CALL                                         !0, 'print_string'
         13        DO_FCALL                                      0          
   38    14      > RETURN                                                   1

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

End of function do_something

Function print_string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WFpm0
function name:  print_string
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_METHOD_CALL                                         'do_something'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   null

End of function print_string

End of class foo.

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

End of function do_something

Function print_string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WFpm0
function name:  print_string
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_METHOD_CALL                                         'do_something'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   null

End of function print_string

End of class bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.86 ms | 1011 KiB | 15 Q