3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($text = "Bar") { echo $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/Uhari
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_CONSTANT                                   ~1      'foo'
          1        INIT_ARRAY                                       ~2      ~1, 'func'
    8     2        ASSIGN                                                   !0, ~2
   13     3        FETCH_DIM_R                                      ~4      !0, 'func'
          4        INIT_DYNAMIC_CALL                                        ~4
          5        DO_FCALL                                      0          
   14     6        FETCH_DIM_R                                      ~6      !0, 'func'
          7        INIT_DYNAMIC_CALL                                        ~6
          8        SEND_VAL_EX                                              'Foo+Bar'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.48 ms | 1393 KiB | 13 Q