3v4l.org

run code in 300+ PHP versions simultaneously
<?php function arrayToTable($arData) { $resString = ""; if(is_array($arData)) { $resString = "<table col='6' id='decisList' >" ."<thead>" ."<tr align=center>" ."<th width=20>#</th>" ."<th width=50>Данные постановления</th>" ."<th width=80>ID по ФИАС</th>" ."<th>Контактный e-mail</th>" ."<th width=80>Приложение</th>" ."<th width=50>Действия</th>" ."</tr>" ."</thead>" ."<tbody>"; // ------------------------ Тело таблицы --------------------- // $rnum = 0; foreach($arData as $arItem) { $resString .= "<tr decId=\"".$arItem["CODE"]."\" id=\"sid_".substr($arItem["ID"],-20)."\" >" ."<td>".++$rnum."</td>" ."<td class='decis'>".$arItem["NAME"]."</td>" ."<td class='gid'>".$arItem["CODE"]."</td>" ."<td class='email'>".$arItem["EMAIL"]."</td>" ."<td class='postnum'><a href='".$arItem["ATT"]."' target='_blank' title='Скачать приложенный файл'>Скачать</a></td>" ."<td class='actions' align=\"right\"><b>ПОДТВЕРЖДЕНО</b> | <b>НЕ ПОДТВЕРЖДЕНО</b></td>" ."</tr>"; } // ------------------------ Тело таблицы END --------------- // $resString .= "</tbody>" ."</table>"; } return $resString; } echo arrayToTable(array( array( "ID"=>"111", "CODE"=>"333", "NAME"=>"222", "EMAIL"=>"3333", "ATT"=>"222" ) )); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ge4dB
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   INIT_FCALL                                               'arraytotable'
   41     1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   48     4      > RETURN                                                   1

Function arraytotable:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 44
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 42
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 42
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
Branch analysis from position: 44
filename:       /in/ge4dB
function name:  arrayToTable
number of ops:  46
compiled vars:  !0 = $arData, !1 = $resString, !2 = $rnum, !3 = $arItem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, ''
    5     2        TYPE_CHECK                                  128          !0
          3      > JMPZ                                                     ~5, ->44
    7     4    >   ASSIGN                                                   !1, '%3Ctable+col%3D%276%27++id%3D%27decisList%27+%3E%3Cthead%3E%3Ctr+align%3Dcenter%3E%3Cth+width%3D20%3E%23%3C%2Fth%3E%3Cth+width%3D50%3E%D0%94%D0%B0%D0%BD%D0%BD%D1%8B%D0%B5+%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F%3C%2Fth%3E%3Cth+width%3D80%3EID+%D0%BF%D0%BE+%D0%A4%D0%98%D0%90%D0%A1%3C%2Fth%3E%3Cth%3E%D0%9A%D0%BE%D0%BD%D1%82%D0%B0%D0%BA%D1%82%D0%BD%D1%8B%D0%B9+e-mail%3C%2Fth%3E%3Cth+width%3D80%3E%D0%9F%D1%80%D0%B8%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%3C%2Fth%3E%3Cth+width%3D50%3E%D0%94%D0%B5%D0%B9%D1%81%D1%82%D0%B2%D0%B8%D1%8F%3C%2Fth%3E%3C%2Ftr%3E%3C%2Fthead%3E%3Ctbody%3E'
   20     5        ASSIGN                                                   !2, 0
   21     6      > FE_RESET_R                                       $8      !0, ->42
          7    > > FE_FETCH_R                                               $8, !3, ->42
   23     8    >   FETCH_DIM_R                                      ~9      !3, 'CODE'
          9        CONCAT                                           ~10     '%3Ctr+decId%3D%22', ~9
         10        CONCAT                                           ~11     ~10, '%22+id%3D%22sid_'
         11        INIT_FCALL                                               'substr'
         12        FETCH_DIM_R                                      ~12     !3, 'ID'
         13        SEND_VAL                                                 ~12
         14        SEND_VAL                                                 -20
         15        DO_ICALL                                         $13     
         16        CONCAT                                           ~14     ~11, $13
         17        CONCAT                                           ~15     ~14, '%22+%3E'
   24    18        CONCAT                                           ~16     ~15, '%3Ctd%3E'
         19        PRE_INC                                          ~17     !2
         20        CONCAT                                           ~18     ~16, ~17
         21        CONCAT                                           ~19     ~18, '%3C%2Ftd%3E'
   25    22        CONCAT                                           ~20     ~19, '%3Ctd+class%3D%27decis%27%3E'
         23        FETCH_DIM_R                                      ~21     !3, 'NAME'
         24        CONCAT                                           ~22     ~20, ~21
         25        CONCAT                                           ~23     ~22, '%3C%2Ftd%3E'
   26    26        CONCAT                                           ~24     ~23, '%3Ctd+class%3D%27gid%27%3E'
         27        FETCH_DIM_R                                      ~25     !3, 'CODE'
         28        CONCAT                                           ~26     ~24, ~25
         29        CONCAT                                           ~27     ~26, '%3C%2Ftd%3E'
   27    30        CONCAT                                           ~28     ~27, '%3Ctd+class%3D%27email%27%3E'
         31        FETCH_DIM_R                                      ~29     !3, 'EMAIL'
         32        CONCAT                                           ~30     ~28, ~29
         33        CONCAT                                           ~31     ~30, '%3C%2Ftd%3E'
   28    34        CONCAT                                           ~32     ~31, '%3Ctd+class%3D%27postnum%27%3E%3Ca+href%3D%27'
         35        FETCH_DIM_R                                      ~33     !3, 'ATT'
         36        CONCAT                                           ~34     ~32, ~33
         37        CONCAT                                           ~35     ~34, '%27+target%3D%27_blank%27+title%3D%27%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C+%D0%BF%D1%80%D0%B8%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9+%D1%84%D0%B0%D0%B9%D0%BB%27%3E%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%3C%2Fa%3E%3C%2Ftd%3E'
   29    38        CONCAT                                           ~36     ~35, '%3Ctd+class%3D%27actions%27+align%3D%22right%22%3E%3Cb%3E%D0%9F%D0%9E%D0%94%D0%A2%D0%92%D0%95%D0%A0%D0%96%D0%94%D0%95%D0%9D%D0%9E%3C%2Fb%3E+%7C+%3Cb%3E%D0%9D%D0%95+%D0%9F%D0%9E%D0%94%D0%A2%D0%92%D0%95%D0%A0%D0%96%D0%94%D0%95%D0%9D%D0%9E%3C%2Fb%3E%3C%2Ftd%3E'
   30    39        CONCAT                                           ~37     ~36, '%3C%2Ftr%3E'
         40        ASSIGN_OP                                     8          !1, ~37
   21    41      > JMP                                                      ->7
         42    >   FE_FREE                                                  $8
   34    43        ASSIGN_OP                                     8          !1, '%3C%2Ftbody%3E%3C%2Ftable%3E'
   36    44    > > RETURN                                                   !1
   37    45*     > RETURN                                                   null

End of function arraytotable

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.91 ms | 1403 KiB | 16 Q