3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", ]; foreach (array_chunk($arr, 3) as $group) { $first = array_shift($group); echo "<div>$first</div>\n"; echo "<div>\n"; foreach ($group as $elm) { echo "$elm\n"; } echo "</div>"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 25
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 25
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 22
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/ijZaq
function name:  (null)
number of ops:  27
compiled vars:  !0 = $arr, !1 = $group, !2 = $first, !3 = $elm
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   16     1        INIT_FCALL                                               'array_chunk'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 3
          4        DO_ICALL                                         $5      
          5      > FE_RESET_R                                       $6      $5, ->25
          6    > > FE_FETCH_R                                               $6, !1, ->25
   17     7    >   INIT_FCALL                                               'array_shift'
          8        SEND_REF                                                 !1
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
   18    11        ROPE_INIT                                     3  ~10     '%3Cdiv%3E'
         12        ROPE_ADD                                      1  ~10     ~10, !2
         13        ROPE_END                                      2  ~9      ~10, '%3C%2Fdiv%3E%0A'
         14        ECHO                                                     ~9
   19    15        ECHO                                                     '%3Cdiv%3E%0A'
   20    16      > FE_RESET_R                                       $12     !1, ->22
         17    > > FE_FETCH_R                                               $12, !3, ->22
   21    18    >   NOP                                                      
         19        FAST_CONCAT                                      ~13     !3, '%0A'
         20        ECHO                                                     ~13
   20    21      > JMP                                                      ->17
         22    >   FE_FREE                                                  $12
   23    23        ECHO                                                     '%3C%2Fdiv%3E'
   16    24      > JMP                                                      ->6
         25    >   FE_FREE                                                  $6
   24    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.67 ms | 1004 KiB | 15 Q