3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create function with the name defined in variable $functionName function MyFunction($argument) { return 'Argument passed is: '.$argument; } $functionName = 'MyFunction'; var_dump(MyFunction('Calling MyFunction directly.')); var_dump($functionName('Calling MyFunction with string.'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qr7Kb
function name:  (null)
number of ops:  14
compiled vars:  !0 = $functionName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'MyFunction'
    9     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'myfunction'
          3        SEND_VAL                                                 'Calling+MyFunction+directly.'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
   10     7        INIT_FCALL                                               'var_dump'
          8        INIT_DYNAMIC_CALL                                        !0
          9        SEND_VAL_EX                                              'Calling+MyFunction+with+string.'
         10        DO_FCALL                                      0  $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qr7Kb
function name:  MyFunction
number of ops:  4
compiled vars:  !0 = $argument
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        CONCAT                                           ~1      'Argument+passed+is%3A+', !0
          2      > RETURN                                                   ~1
    5     3*     > RETURN                                                   null

End of function myfunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.53 ms | 1438 KiB | 15 Q