3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FE5cQb%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E5cQb
function name:  {closure}
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FE5cQb%3A3%241'
    5     1      > RETURN                                                   ~0
    6     2*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FE5cQb%3A2%240

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

End of function %00%7Bclosure%7D%2Fin%2FE5cQb%3A3%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.3 ms | 1398 KiB | 13 Q