3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dontSwitch($option) { $actions = array( '*' => 'multiply', '/' => 'divide', '*/' => 'shit' ); return call_user_func($actions[$option]); } function multiply() { return 'fuuuuu'; } function divide() { return 'dump'; } function multdiv() { return 'shit'; } echo dontSwitch('*');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7T3e
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'dontswitch'
          1        SEND_VAL                                                 '%2A'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function dontswitch:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7T3e
function name:  dontSwitch
number of ops:  7
compiled vars:  !0 = $option, !1 = $actions
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, <array>
    8     2        FETCH_DIM_R                                      ~3      !1, !0
          3        INIT_USER_CALL                                0          'call_user_func', ~3
          4        DO_FCALL                                      0  $4      
          5      > RETURN                                                   $4
    9     6*     > RETURN                                                   null

End of function dontswitch

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

End of function multiply

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

End of function divide

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

End of function multdiv

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.53 ms | 1399 KiB | 14 Q