3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($text = "Bar") { echo "\r\n$text"; } // Pass the function to the array. Do not use () here. $array = array( 'func' => "foo" ); // And call it. $array['func'](); // Outputs: "Bar" $array['func']("Foo Bar"); // Outputs: "Foo Bar"
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/18ISI
function name:  (null)
number of ops:  9
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
   13     1        FETCH_DIM_R                                      ~2      !0, 'func'
          2        INIT_DYNAMIC_CALL                                        ~2
          3        DO_FCALL                                      0          
   14     4        FETCH_DIM_R                                      ~4      !0, 'func'
          5        INIT_DYNAMIC_CALL                                        ~4
          6        SEND_VAL_EX                                              'Foo+Bar'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/18ISI
function name:  foo
number of ops:  5
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      'Bar'
    4     1        NOP                                                      
          2        FAST_CONCAT                                      ~1      '%0D%0A', !0
          3        ECHO                                                     ~1
    5     4      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.59 ms | 1393 KiB | 13 Q