3v4l.org

run code in 300+ PHP versions simultaneously
<?php $limit = 4; $selections = ['a', 'b', 'c', 'd', 'e']; shuffle($selections); foreach ($selections as $i => $selection) { echo "before include $selection\n"; // start include code... if ($i < $limit) { echo "**display limited $selection**\n"; } // end include code echo "after include $selection\n"; echo "---\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 24
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 24
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 18
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/I6bnC
function name:  (null)
number of ops:  26
compiled vars:  !0 = $limit, !1 = $selections, !2 = $selection, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 4
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'shuffle'
          3        SEND_REF                                                 !1
          4        DO_ICALL                                                 
    5     5      > FE_RESET_R                                       $7      !1, ->24
          6    > > FE_FETCH_R                                       ~8      $7, !2, ->24
          7    >   ASSIGN                                                   !3, ~8
    6     8        ROPE_INIT                                     3  ~11     'before+include+'
          9        ROPE_ADD                                      1  ~11     ~11, !2
         10        ROPE_END                                      2  ~10     ~11, '%0A'
         11        ECHO                                                     ~10
    8    12        IS_SMALLER                                               !3, !0
         13      > JMPZ                                                     ~13, ->18
    9    14    >   ROPE_INIT                                     3  ~15     '%2A%2Adisplay+limited+'
         15        ROPE_ADD                                      1  ~15     ~15, !2
         16        ROPE_END                                      2  ~14     ~15, '%2A%2A%0A'
         17        ECHO                                                     ~14
   12    18    >   ROPE_INIT                                     3  ~18     'after+include+'
         19        ROPE_ADD                                      1  ~18     ~18, !2
         20        ROPE_END                                      2  ~17     ~18, '%0A'
         21        ECHO                                                     ~17
   13    22        ECHO                                                     '---%0A'
    5    23      > JMP                                                      ->6
         24    >   FE_FREE                                                  $7
   14    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
126.37 ms | 1011 KiB | 14 Q