3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$files = glob("images/*.{gif,jpg,jpeg,png}", GLOB_BRACE); $files = [ 'foo.jpg', 'foo1.png', 'foo2.png', 'foo3.png', 'foo4.png', 'foo5.png', 'foo6.png', 'foo7.png', 'foo8.png', 'foo9.png', 'foo10.png' ]; foreach ($files as $key => $file) { if ($key % 3 == 0) { // change 3 to how many items between rows if ($key != 0) { echo '</div>'.PHP_EOL; } echo '<div class="row">'.PHP_EOL; } echo '<div class="column"><img src="'.$file.'" style=width:100% /></div>'.PHP_EOL; } ?> </div>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
Branch analysis from position: 11
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/Y3bXo
function name:  (null)
number of ops:  19
compiled vars:  !0 = $files, !1 = $file, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   18     1      > FE_RESET_R                                       $4      !0, ->16
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->16
          3    >   ASSIGN                                                   !2, ~5
   19     4        MOD                                              ~7      !2, 3
          5        IS_EQUAL                                                 ~7, 0
          6      > JMPZ                                                     ~8, ->11
   20     7    >   IS_NOT_EQUAL                                             !2, 0
          8      > JMPZ                                                     ~9, ->10
          9    >   ECHO                                                     '%3C%2Fdiv%3E%0A'
   21    10    >   ECHO                                                     '%3Cdiv+class%3D%22row%22%3E%0A'
   23    11    >   CONCAT                                           ~10     '%3Cdiv+class%3D%22column%22%3E%3Cimg+src%3D%22', !1
         12        CONCAT                                           ~11     ~10, '%22+style%3Dwidth%3A100%25+%2F%3E%3C%2Fdiv%3E'
         13        CONCAT                                           ~12     ~11, '%0A'
         14        ECHO                                                     ~12
   18    15      > JMP                                                      ->2
         16    >   FE_FREE                                                  $4
   26    17        ECHO                                                     '%3C%2Fdiv%3E'
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.24 ms | 1398 KiB | 13 Q