3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($x) { echo $x; } $funs = array(); for ($i=0; $i<10; $i++) { $funs[] = f($i); } for ($i=0; $i<10; $i++) { $g = $funs[$i]; //$g(); }
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 = 3
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 13
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 13
Branch analysis from position: 18
Branch analysis from position: 13
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/X9gEH
function name:  (null)
number of ops:  19
compiled vars:  !0 = $funs, !1 = $i, !2 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->9
    9     3    >   INIT_FCALL                                               'f'
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $6      
          6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  $6
    8     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 10
         10      > JMPNZ                                                    ~8, ->3
   12    11    >   ASSIGN                                                   !1, 0
         12      > JMP                                                      ->16
   13    13    >   FETCH_DIM_R                                      ~10     !0, !1
         14        ASSIGN                                                   !2, ~10
   12    15        PRE_INC                                                  !1
         16    >   IS_SMALLER                                               !1, 10
         17      > JMPNZ                                                    ~13, ->13
   15    18    > > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X9gEH
function name:  f
number of ops:  3
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ECHO                                                     !0
    5     2      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.37 ms | 1390 KiB | 14 Q