3v4l.org

run code in 300+ PHP versions simultaneously
<?php $func = function($param, $block) { echo $block($param); }; $another_func = function() { $block = function($param) { echo $param; }; $func("Hello", $block); }; $another_func(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kvuU4
function name:  (null)
number of ops:  7
compiled vars:  !0 = $func, !1 = $another_func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkvuU4%3A3%240'
          1        ASSIGN                                                   !0, ~2
    8     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkvuU4%3A8%241'
          3        ASSIGN                                                   !1, ~4
   18     4        INIT_DYNAMIC_CALL                                        !1
          5        DO_FCALL                                      0          
   20     6      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FkvuU4%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kvuU4
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $param, !1 = $block
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_DYNAMIC_CALL                                        !1
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
    6     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkvuU4%3A3%240

Function %00%7Bclosure%7D%2Fin%2FkvuU4%3A8%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kvuU4
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $block, !1 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkvuU4%3A10%242'
          1        ASSIGN                                                   !0, ~2
   15     2        INIT_DYNAMIC_CALL                                        !1
          3        SEND_VAL_EX                                              'Hello'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   16     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkvuU4%3A8%241

Function %00%7Bclosure%7D%2Fin%2FkvuU4%3A10%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kvuU4
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        ECHO                                                     !0
   13     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkvuU4%3A10%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.64 ms | 1395 KiB | 13 Q