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.')); echo $functionName('Calling MyFunction with string.');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SjiVJ
function name:  (null)
number of ops:  12
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_DYNAMIC_CALL                                        !0
          8        SEND_VAL_EX                                              'Calling+MyFunction+with+string.'
          9        DO_FCALL                                      0  $4      
         10        ECHO                                                     $4
         11      > RETURN                                                   1

Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SjiVJ
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:
154.73 ms | 1397 KiB | 16 Q