3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rows_count = 4; $array = range(1, 9); $chuncked_array = array_chunk($array, $rows_count); echo "<table>\n"; call_user_func_array('array_map', array_merge(array(function() { echo "<tr>\n"; array_map(function ($value) { echo " <td>$value</td>\n"; }, func_get_args()); echo "</tr>\n"; }), $chuncked_array)); echo "</table>\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SOCV
function name:  (null)
number of ops:  24
compiled vars:  !0 = $rows_count, !1 = $array, !2 = $chuncked_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 4
    5     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 9
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    7     6        INIT_FCALL                                               'array_chunk'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    9    11        ECHO                                                     '%3Ctable%3E%0A'
   10    12        INIT_FCALL                                               'array_map'
         13        INIT_FCALL                                               'array_merge'
         14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7SOCV%3A10%240'
   18    15        INIT_ARRAY                                       ~9      ~8
         16        SEND_VAL                                                 ~9
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $10     
         19        SEND_ARRAY                                               $10
         20        CHECK_UNDEF_ARGS                                         
         21        DO_FCALL                                      0          
   19    22        ECHO                                                     '%3C%2Ftable%3E%0A'
         23      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F7SOCV%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SOCV
function name:  {closure}
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     '%3Ctr%3E%0A'
   13     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7SOCV%3A13%241'
   16     3        SEND_VAL                                                 ~0
          4        FUNC_GET_ARGS                                    ~1      
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                                 
   17     7        ECHO                                                     '%3C%2Ftr%3E%0A'
   18     8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F7SOCV%3A10%240

Function %00%7Bclosure%7D%2Fin%2F7SOCV%3A13%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SOCV
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        ROPE_INIT                                     3  ~2      '++++%3Ctd%3E'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%3C%2Ftd%3E%0A'
          4        ECHO                                                     ~1
   16     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F7SOCV%3A13%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164 ms | 1400 KiB | 21 Q