3v4l.org

run code in 300+ PHP versions simultaneously
<?php function makeTableFromArray($array){ $tbl = "<table>"; $i = count($array); while($i--){ $tbl .= "<tr>"; $row = $array[$i]; $n = count($row); while($n--){ echo "<td>".$row[$n]."</td>"; } $tbl .= "</tr>"; } $tbl .= "</table>"; } $data = array ( 1 => array ( '01:00' => '1', '02:00' => '', ), 2 => array ( '01:00' => '3', '02:00' => '', ), 3 => array ( '01:00' => '23', '02:00' => '', ), 4 => array ( '01:00' => '234', '02:00' => '', ), 5 => array ( '01:00' => '234', '02:00' => '', ), 6 => array ( '01:00' => '', '02:00' => '', ), 7 => array ( '01:00' => '', '02:00' => '', ), ); echo makeTableFromArray($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hf2I2
function name:  (null)
number of ops:  6
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, <array>
   29     1        INIT_FCALL                                               'maketablefromarray'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function maketablefromarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 5
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 11
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 5
Branch analysis from position: 20
Branch analysis from position: 5
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 11
Branch analysis from position: 17
Branch analysis from position: 11
filename:       /in/hf2I2
function name:  makeTableFromArray
number of ops:  22
compiled vars:  !0 = $array, !1 = $tbl, !2 = $i, !3 = $row, !4 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, '%3Ctable%3E'
    6     2        COUNT                                            ~6      !0
          3        ASSIGN                                                   !2, ~6
    7     4      > JMP                                                      ->18
    8     5    >   ASSIGN_OP                                     8          !1, '%3Ctr%3E'
    9     6        FETCH_DIM_R                                      ~9      !0, !2
          7        ASSIGN                                                   !3, ~9
   10     8        COUNT                                            ~11     !3
          9        ASSIGN                                                   !4, ~11
   11    10      > JMP                                                      ->15
   12    11    >   FETCH_DIM_R                                      ~13     !3, !4
         12        CONCAT                                           ~14     '%3Ctd%3E', ~13
         13        CONCAT                                           ~15     ~14, '%3C%2Ftd%3E'
         14        ECHO                                                     ~15
   11    15    >   POST_DEC                                         ~16     !4
         16      > JMPNZ                                                    ~16, ->11
   14    17    >   ASSIGN_OP                                     8          !1, '%3C%2Ftr%3E'
    7    18    >   POST_DEC                                         ~18     !2
         19      > JMPNZ                                                    ~18, ->5
   16    20    >   ASSIGN_OP                                     8          !1, '%3C%2Ftable%3E'
   17    21      > RETURN                                                   null

End of function maketablefromarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.09 ms | 1399 KiB | 14 Q