3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('fu' => 'bar'); class Fu { public function bar() { return __METHOD__; } } $fu = new Fu(); var_dump( call_user_func(array($fu, $arr['fu'])) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HHJfh
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr, !1 = $fu
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        NEW                                              $3      'Fu'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   11     4        INIT_FCALL                                               'var_dump'
          5        INIT_ARRAY                                       ~6      !1
          6        FETCH_DIM_R                                      ~7      !0, 'fu'
          7        ADD_ARRAY_ELEMENT                                ~6      ~7
          8        INIT_USER_CALL                                0          'call_user_func', ~6
          9        DO_FCALL                                      0  $8      
         10        SEND_VAR                                                 $8
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function bar

End of class Fu.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.2 ms | 1395 KiB | 15 Q