3v4l.org

run code in 500+ PHP versions simultaneously
<?php $rows = [ ["code" => "1"], ["code" => "2"], ["code" => "3"], ["code" => "4"], ["code" => "5"], ["code" => "6"], ]; $sections = array_chunk($rows, 5); foreach ($sections as $section) { $teamList = implode(",", array_map(function($row) { return $row['code']; }, $section)); echo "<section>$teamList</section>"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 20
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/mXRtV
function name:  (null)
number of ops:  22
compiled vars:  !0 = $rows, !1 = $sections, !2 = $section, !3 = $teamList
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
   11     1        INIT_FCALL                                                   'array_chunk'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     5
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
   13     6      > FE_RESET_R                                           $7      !1, ->20
          7    > > FE_FETCH_R                                                   $7, !2, ->20
   14     8    >   INIT_FCALL                                                   'array_map'
          9        DECLARE_LAMBDA_FUNCTION                              ~8      [0]
   16    10        SEND_VAL                                                     ~8
         11        SEND_VAR                                                     !2
   14    12        DO_ICALL                                             $9      
         13        FRAMELESS_ICALL_2                implode             ~10     '%2C', $9
         14        ASSIGN                                                       !3, ~10
   17    15        ROPE_INIT                                         3  ~13     '%3Csection%3E'
         16        ROPE_ADD                                          1  ~13     ~13, !3
         17        ROPE_END                                          2  ~12     ~13, '%3C%2Fsection%3E'
         18        ECHO                                                         ~12
   13    19      > JMP                                                          ->7
         20    >   FE_FREE                                                      $7
   18    21      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mXRtV
function name:  {closure:/in/mXRtV:14}
number of ops:  4
compiled vars:  !0 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   RECV                                                 !0      
   15     1        FETCH_DIM_R                                          ~1      !0, 'code'
          2      > RETURN                                                       ~1
   16     3*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.72 ms | 1889 KiB | 15 Q