3v4l.org

run code in 500+ PHP versions simultaneously
<?php $foo = (function($a) { return function($b) use ($a) { return $a + $b; }; })(42); echo $foo(10);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f63Wn
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                              ~1      [0]
    6     1        INIT_DYNAMIC_CALL                                            ~1
          2        SEND_VAL_EX                                                  42
          3        DO_FCALL                                          0  $2      
    2     4        ASSIGN                                                       !0, $2
    7     5        INIT_DYNAMIC_CALL                                            !0
          6        SEND_VAL_EX                                                  10
          7        DO_FCALL                                          0  $4      
          8        ECHO                                                         $4
          9      > 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/f63Wn
function name:  {closure:/in/f63Wn:2}
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   RECV                                                 !0      
    3     1        DECLARE_LAMBDA_FUNCTION                              ~1      [0]
          2        BIND_LEXICAL                                                 ~1, !0
    5     3      > RETURN                                                       ~1
    6     4*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f63Wn
function name:  {closure:{closure:/in/f63Wn:2}:3}
number of ops:  5
compiled vars:  !0 = $b, !1 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
    4     2        ADD                                                  ~2      !1, !0
          3      > RETURN                                                       ~2
    5     4*     > RETURN                                                       null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.08 ms | 2658 KiB | 13 Q