3v4l.org

run code in 300+ PHP versions simultaneously
<?php class USER // should be a StudlyCased class name { static function find_by_username($name) { printf('You tried to find a user by username "%s"', $name); } } $array = array('USER', 'username', 'other', 'test'); call_user_func_array(array($array[0], 'find_by_' . $array[1]), array($array[3]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D3lcl
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   13     1        FETCH_DIM_R                                      ~2      !0, 0
          2        INIT_ARRAY                                       ~3      ~2
          3        FETCH_DIM_R                                      ~4      !0, 1
          4        CONCAT                                           ~5      'find_by_', ~4
          5        ADD_ARRAY_ELEMENT                                ~3      ~5
          6        INIT_USER_CALL                                0          'call_user_func_array', ~3
          7        FETCH_DIM_R                                      ~6      !0, 3
          8        INIT_ARRAY                                       ~7      ~6
          9        SEND_ARRAY                                               ~7
         10        CHECK_UNDEF_ARGS                                         
         11        DO_FCALL                                      1          
         12      > RETURN                                                   1

Class USER:
Function find_by_username:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D3lcl
function name:  find_by_username
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'printf'
          2        SEND_VAL                                                 'You+tried+to+find+a+user+by+username+%22%25s%22'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    8     5      > RETURN                                                   null

End of function find_by_username

End of class USER.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.06 ms | 1009 KiB | 14 Q