3v4l.org

run code in 300+ PHP versions simultaneously
<?php $target = array(1,2,3,4,5,6,7,8,9,10,11,12,13); $target = array_chunk($target, 3); //Split the array into chunks of 3. $result = array_map(function ($el) { return implode("</td><td>", $el); //Implode the inner arrays with table cells }, $target); $result = implode("</td></tr><tr><td>", $result); //Implode the outer arrays with table rows. echo "<table><tr><td>"; echo $result; echo "</td></tr></table>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QilJ8
function name:  (null)
number of ops:  21
compiled vars:  !0 = $target, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_chunk'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 3
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    4     6        INIT_FCALL                                               'array_map'
          7        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
    6     8        SEND_VAL                                                 ~5
          9        SEND_VAR                                                 !0
    4    10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !1, $6
    7    12        INIT_FCALL                                               'implode'
         13        SEND_VAL                                                 '%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%3E%3Ctd%3E'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !1, $8
    9    17        ECHO                                                     '%3Ctable%3E%3Ctr%3E%3Ctd%3E'
   10    18        ECHO                                                     !1
   11    19        ECHO                                                     '%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftable%3E'
         20      > 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/QilJ8
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $el
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%3C%2Ftd%3E%3Ctd%3E'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
    6     6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.08 ms | 1001 KiB | 16 Q