3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = []; $callback = function () use ($count) { $count[] = 1; var_dump($count); }; for ($i = 0; $i < 4; $i++) { call_user_func($callback); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
Branch analysis from position: 6
filename:       /in/1oWU8
function name:  (null)
number of ops:  12
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%2F1oWU8%3A3%240'
          2        BIND_LEXICAL                                             ~4, !0
          3        ASSIGN                                                   !1, ~4
    7     4        ASSIGN                                                   !2, 0
          5      > JMP                                                      ->9
    8     6    >   INIT_USER_CALL                                0          'call_user_func', !1
          7        DO_FCALL                                      0          
    7     8        PRE_INC                                                  !2
          9    >   IS_SMALLER                                               !2, 4
         10      > JMPNZ                                                    ~9, ->6
    9    11    > > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.6 ms | 1395 KiB | 15 Q