3v4l.org

run code in 300+ PHP versions simultaneously
<?php function outputListItems($char) { static $index = array('A' => 1); if (!isset($index[$char])) { $index[$char] = 1; } for ($i = 0; $i < 3; $i++) { echo '<li>'; echo $char; echo $index[$char]++; echo '<ul>'; outputListItems($char++); echo '</ul>'; echo '</li>'; } } ?> <ul> <li> A1 <ul><?php outputListItems('B'); ?></ul> </li> </ul>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8h5AB
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ECHO                                                     '%0A%3Cul%3E%0A++++%3Cli%3E%0A++++++++A1%0A++++++++%3Cul%3E'
   26     1        INIT_FCALL                                               'outputlistitems'
          2        SEND_VAL                                                 'B'
          3        DO_FCALL                                      0          
          4        ECHO                                                     '%3C%2Ful%3E%0A++++%3C%2Fli%3E%0A%3C%2Ful%3E'
   28     5      > RETURN                                                   1

Function outputlistitems:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 9
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 9
Branch analysis from position: 24
Branch analysis from position: 9
Branch analysis from position: 7
filename:       /in/8h5AB
function name:  outputListItems
number of ops:  25
compiled vars:  !0 = $char, !1 = $index, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        BIND_STATIC                                              !1
    6     2        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      !1, !0
          3        BOOL_NOT                                         ~4      ~3
          4      > JMPZ                                                     ~4, ->7
    7     5    >   ASSIGN_DIM                                               !1, !0
          6        OP_DATA                                                  1
   10     7    >   ASSIGN                                                   !2, 0
          8      > JMP                                                      ->22
   11     9    >   ECHO                                                     '%3Cli%3E'
   12    10        ECHO                                                     !0
   13    11        FETCH_DIM_RW                                     $7      !1, !0
         12        POST_INC                                         ~8      $7
         13        ECHO                                                     ~8
   14    14        ECHO                                                     '%3Cul%3E'
   15    15        INIT_FCALL_BY_NAME                                       'outputListItems'
         16        POST_INC                                         ~9      !0
         17        SEND_VAL_EX                                              ~9
         18        DO_FCALL                                      0          
   16    19        ECHO                                                     '%3C%2Ful%3E'
   17    20        ECHO                                                     '%3C%2Fli%3E'
   10    21        PRE_INC                                                  !2
         22    >   IS_SMALLER                                               !2, 3
         23      > JMPNZ                                                    ~12, ->9
   19    24    > > RETURN                                                   null

End of function outputlistitems

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.64 ms | 1399 KiB | 14 Q