3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = []; $callback = function ($i) use ($count) { $count[] = $i; }; for ($i = 0; $i < 4; $i++) { call_user_func($callback, $i); } var_dump($count);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/DMUVt
function name:  (null)
number of ops:  16
compiled vars:  !0 = $count, !1 = $callback, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FDMUVt%3A3%240'
          2        BIND_LEXICAL                                             ~4, !0
          3        ASSIGN                                                   !1, ~4
    6     4        ASSIGN                                                   !2, 0
          5      > JMP                                                      ->10
    7     6    >   INIT_USER_CALL                                1          'call_user_func', !1
          7        SEND_USER                                                !2
          8        DO_FCALL                                      0          
    6     9        PRE_INC                                                  !2
         10    >   IS_SMALLER                                               !2, 4
         11      > JMPNZ                                                    ~9, ->6
   10    12    >   INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.27 ms | 1395 KiB | 15 Q