3v4l.org

run code in 500+ PHP versions simultaneously
<?php $resultset=[ ['avatar'=>1,'username'=>'A'], ['avatar'=>2,'username'=>'B'], ['avatar'=>3,'username'=>'C'], ['avatar'=>4,'username'=>'D'], ['avatar'=>5,'username'=>'E'], ['avatar'=>6,'username'=>'F'], ['avatar'=>7,'username'=>'G'] ]; if(sizeof($resultset)){ // your num rows $counter=0; foreach($resultset as $row){ // you while loop if($counter%6==0){ if($counter){ echo "</div>\n"; } echo "<div class='ui stackable six cards'>\n"; // start new group } echo "\t<div class='ui card small'>\n"; echo "\t\t<div class='ui card small'><div class='image'><img src='".$row["avatar"]."'></div>\n"; echo "\t\t<div class='content'><a class='header'>Dias".$row["username"]."</a></div></div>\n"; echo "\t</div>\n"; ++$counter; } echo "</div>\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 26
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 24
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 24
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 11
Branch analysis from position: 12
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 26
filename:       /in/mDU7E
function name:  (null)
number of ops:  27
compiled vars:  !0 = $resultset, !1 = $counter, !2 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
   11     1        COUNT                                                ~4      !0
          2      > JMPZ                                                         ~4, ->26
   12     3    >   ASSIGN                                                       !1, 0
   13     4      > FE_RESET_R                                           $6      !0, ->24
          5    > > FE_FETCH_R                                                   $6, !2, ->24
   14     6    >   MOD                                                  ~7      !1, 6
          7        IS_EQUAL                                                     ~7, 0
          8      > JMPZ                                                         ~8, ->12
   15     9    > > JMPZ                                                         !1, ->11
   16    10    >   ECHO                                                         '%3C%2Fdiv%3E%0A'
   18    11    >   ECHO                                                         '%3Cdiv+class%3D%27ui+stackable+six+cards%27%3E%0A'
   20    12    >   ECHO                                                         '%09%3Cdiv+class%3D%27ui+card+small%27%3E%0A'
   21    13        FETCH_DIM_R                                          ~9      !2, 'avatar'
         14        CONCAT                                               ~10     '%09%09%3Cdiv+class%3D%27ui+card+small%27%3E%3Cdiv+class%3D%27image%27%3E%3Cimg+src%3D%27', ~9
         15        CONCAT                                               ~11     ~10, '%27%3E%3C%2Fdiv%3E%0A'
         16        ECHO                                                         ~11
   22    17        FETCH_DIM_R                                          ~12     !2, 'username'
         18        CONCAT                                               ~13     '%09%09%3Cdiv+class%3D%27content%27%3E%3Ca+class%3D%27header%27%3EDias', ~12
         19        CONCAT                                               ~14     ~13, '%3C%2Fa%3E%3C%2Fdiv%3E%3C%2Fdiv%3E%0A'
         20        ECHO                                                         ~14
   23    21        ECHO                                                         '%09%3C%2Fdiv%3E%0A'
   24    22        PRE_INC                                                      !1
   13    23      > JMP                                                          ->5
         24    >   FE_FREE                                                      $6
   26    25        ECHO                                                         '%3C%2Fdiv%3E%0A'
   27    26    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
137.05 ms | 2341 KiB | 13 Q