3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = function($s) { echo $s*2; }; $f(4); $g = function($a,$h) { echo $a + $h(4); }; $g(5,$f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q0Nmg
function name:  (null)
number of ops:  12
compiled vars:  !0 = $f, !1 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fq0Nmg%3A3%240'
          1        ASSIGN                                                   !0, ~2
    5     2        INIT_DYNAMIC_CALL                                        !0
          3        SEND_VAL_EX                                              4
          4        DO_FCALL                                      0          
    7     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fq0Nmg%3A7%241'
          6        ASSIGN                                                   !1, ~5
    9     7        INIT_DYNAMIC_CALL                                        !1
          8        SEND_VAL_EX                                              5
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

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

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

Function %00%7Bclosure%7D%2Fin%2Fq0Nmg%3A7%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q0Nmg
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $a, !1 = $h
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_DYNAMIC_CALL                                        !1
          3        SEND_VAL_EX                                              4
          4        DO_FCALL                                      0  $2      
          5        ADD                                              ~3      !0, $2
          6        ECHO                                                     ~3
          7      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fq0Nmg%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.77 ms | 1395 KiB | 13 Q