3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyParentClass { private function g() { } protected function f() { $this->g(); } } class MyChildClass extends MyParentClass { protected function f() { $a = array(1); array_map('parent::f', $a); // A //array_map(function ($x) { return parent::f(); }, $a); // B } public static function test() { $obj = new MyChildClass(); $obj->f(); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cesk0
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E > > RETURN                                                   1

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

End of function g

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

End of function f

End of class MyParentClass.

Class MyChildClass:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cesk0
function name:  f
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 'parent%3A%3Af'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   20     5      > RETURN                                                   null

End of function f

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cesk0
function name:  test
number of ops:  6
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'MyChildClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'f'
          4        DO_FCALL                                      0          
   25     5      > RETURN                                                   null

End of function test

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

End of function g

End of class MyChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.01 ms | 1396 KiB | 15 Q