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'); $array[0]::{'find_by_' . $array[1]}($array[3]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qonWn
function name:  (null)
number of ops:  11
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        FETCH_CLASS                                   0  $3      ~2
          3        FETCH_DIM_R                                      ~4      !0, 1
          4        CONCAT                                           ~5      'find_by_', ~4
          5        INIT_STATIC_METHOD_CALL                                  $3, ~5
          6        CHECK_FUNC_ARG                                           
          7        FETCH_DIM_FUNC_ARG                               $6      !0, 3
          8        SEND_FUNC_ARG                                            $6
          9        DO_FCALL                                      0          
         10      > 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/qonWn
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:
151.48 ms | 1009 KiB | 14 Q