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); $b = function ($x) { parent::f(); }; // array_map('parent::f', $a); // A array_map($b, $a); // B } public static function test() { (new MyChildClass())->f(); } } MyChildClass::test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZJLH2
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   INIT_STATIC_METHOD_CALL                                  'MyChildClass', 'test'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FZJLH2%3A18%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZJLH2
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        INIT_STATIC_METHOD_CALL                                  'f'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FZJLH2%3A18%240

Class MyParentClass:
Function g:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZJLH2
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/ZJLH2
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/ZJLH2
function name:  f
number of ops:  8
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, <array>
   18     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FZJLH2%3A18%240'
          2        ASSIGN                                                   !1, ~3
   20     3        INIT_FCALL                                               'array_map'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   21     7      > 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/ZJLH2
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $0      'MyChildClass'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'f'
          3        DO_FCALL                                      0          
   25     4      > 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/ZJLH2
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:
150.61 ms | 1400 KiB | 15 Q