3v4l.org

run code in 500+ PHP versions simultaneously
<?php $imgsArray = array( 'image1-small.jpg', 'image1-medium.jpg', 'image1-large.jpg', 'image2-small.jpg', 'image2-medium.jpg', 'image2-large.jpg', 'image3-small.jpg', 'image3-medium.jpg', 'image3-large.jpg' ); $imgCaption = array('Adam','Peter','Susi'); $files = 0; for( $i= 0; $i < count($imgsArray); $i=$i+3 ){ $first_char = substr($imgsArray[$i],0,strpos($imgsArray[$i],"-")); echo '<p>This is '.$imgCaption[$files]; echo '<ul>'; echo '<li>'.$first_char.'-small.jpg</li>'; echo '<li>'.$first_char.'-medium.jpg</li>'; echo '<li>'.$first_char.'-large.jpg</li>'; echo '<li>'.$imgCaption[$files].'</li>'; echo '</ul>'; echo '<i>Ciao, '.$imgCaption[$files].'</i><br>---</p>'; $files++; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 5
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 5
Branch analysis from position: 39
Branch analysis from position: 5
filename:       /in/7uEbs
function name:  (null)
number of ops:  40
compiled vars:  !0 = $imgsArray, !1 = $imgCaption, !2 = $files, !3 = $i, !4 = $first_char
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    8     1        ASSIGN                                                       !1, <array>
   10     2        ASSIGN                                                       !2, 0
   12     3        ASSIGN                                                       !3, 0
          4      > JMP                                                          ->36
   13     5    >   FETCH_DIM_R                                          ~9      !0, !3
          6        FETCH_DIM_R                                          ~10     !0, !3
          7        FRAMELESS_ICALL_2                strpos              ~11     ~10, '-'
          8        FRAMELESS_ICALL_3                substr              ~12     ~9, 0
          9        OP_DATA                                                      ~11
         10        ASSIGN                                                       !4, ~12
   15    11        FETCH_DIM_R                                          ~14     !1, !2
         12        CONCAT                                               ~15     '%3Cp%3EThis+is+', ~14
         13        ECHO                                                         ~15
   16    14        ECHO                                                         '%3Cul%3E'
   17    15        CONCAT                                               ~16     '%3Cli%3E', !4
         16        CONCAT                                               ~17     ~16, '-small.jpg%3C%2Fli%3E'
         17        ECHO                                                         ~17
   18    18        CONCAT                                               ~18     '%3Cli%3E', !4
         19        CONCAT                                               ~19     ~18, '-medium.jpg%3C%2Fli%3E'
         20        ECHO                                                         ~19
   19    21        CONCAT                                               ~20     '%3Cli%3E', !4
         22        CONCAT                                               ~21     ~20, '-large.jpg%3C%2Fli%3E'
         23        ECHO                                                         ~21
   20    24        FETCH_DIM_R                                          ~22     !1, !2
         25        CONCAT                                               ~23     '%3Cli%3E', ~22
         26        CONCAT                                               ~24     ~23, '%3C%2Fli%3E'
         27        ECHO                                                         ~24
   21    28        ECHO                                                         '%3C%2Ful%3E'
   22    29        FETCH_DIM_R                                          ~25     !1, !2
         30        CONCAT                                               ~26     '%3Ci%3ECiao%2C+', ~25
         31        CONCAT                                               ~27     ~26, '%3C%2Fi%3E%3Cbr%3E---%3C%2Fp%3E'
         32        ECHO                                                         ~27
   24    33        PRE_INC                                                      !2
   12    34        ADD                                                  ~29     !3, 3
         35        ASSIGN                                                       !3, ~29
         36    >   COUNT                                                ~31     !0
         37        IS_SMALLER                                                   !3, ~31
         38      > JMPNZ                                                        ~32, ->5
   25    39    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.25 ms | 479 KiB | 7 Q