3v4l.org

run code in 500+ PHP versions simultaneously
<?php function callFunc1(Closure $closure) { $closure(); } function callFunc2(Callable $callback) { $callback(); } $function = function() { echo 'Hello, World!'; }; callFunc1($function); // Hello, World! callFunc2($function); // Hello, World!
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kqeYD
function name:  (null)
number of ops:  9
compiled vars:  !0 = $function
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   DECLARE_LAMBDA_FUNCTION                              ~1      [0]
          1        ASSIGN                                                       !0, ~1
   15     2        INIT_FCALL                                                   'callfunc1'
          3        SEND_VAR                                                     !0
          4        DO_FCALL                                          0          
   16     5        INIT_FCALL                                                   'callfunc2'
          6        SEND_VAR                                                     !0
          7        DO_FCALL                                          0          
          8      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kqeYD
function name:  {closure:/in/kqeYD:11}
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                         'Hello%2C+World%21'
   13     1      > RETURN                                                       null

End of Dynamic Function 0

Function callfunc1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kqeYD
function name:  callFunc1
number of ops:  4
compiled vars:  !0 = $closure
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        INIT_DYNAMIC_CALL                                            !0
          2        DO_FCALL                                          0          
    5     3      > RETURN                                                       null

End of function callfunc1

Function callfunc2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kqeYD
function name:  callFunc2
number of ops:  4
compiled vars:  !0 = $callback
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    8     1        INIT_DYNAMIC_CALL                                            !0
          2        DO_FCALL                                          0          
    9     3      > RETURN                                                       null

End of function callfunc2

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
142.71 ms | 3308 KiB | 15 Q