3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create function with the name defined in variable $functionName $functionName = <<< EOF function MyFunction($argument) { return 'Argument passed is: '.$argument; } EOF; 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/HUuEo
function name:  (null)
number of ops:  19
compiled vars:  !0 = $functionName, !1 = $argument
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ROPE_INIT                                     5  ~3      'function+MyFunction%28'
          1        ROPE_ADD                                      1  ~3      ~3, !1
          2        ROPE_ADD                                      2  ~3      ~3, '%29+%7B%0A++++return+%27Argument+passed+is%3A+%27.'
    5     3        ROPE_ADD                                      3  ~3      ~3, !1
          4        ROPE_END                                      4  ~2      ~3, '%3B%0A%7D'
    3     5        ASSIGN                                                   !0, ~2
   10     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL_BY_NAME                                       'MyFunction'
          8        SEND_VAL_EX                                              'Calling+MyFunction+directly.'
          9        DO_FCALL                                      0  $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
   11    12        INIT_FCALL                                               'var_dump'
         13        INIT_DYNAMIC_CALL                                        !0
         14        SEND_VAL_EX                                              'Calling+MyFunction+with+string.'
         15        DO_FCALL                                      0  $9      
         16        SEND_VAR                                                 $9
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.92 ms | 1395 KiB | 15 Q