3v4l.org

run code in 300+ PHP versions simultaneously
<?php function arrayToTable($arData) { $resString = ""; if(is_array($arData)) { foreach($arData as $arItemS)$arDivCodes[] = $arItemS["Division"]; $arDivisions = getDivisionsByCodes($arDivCodes); $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/Y5IpC
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   INIT_FCALL                                               'arraytotable'
   44     1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   51     4      > RETURN                                                   1

Function arraytotable:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 55
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 53
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 53
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
Branch analysis from position: 10
Branch analysis from position: 55
filename:       /in/Y5IpC
function name:  arrayToTable
number of ops:  57
compiled vars:  !0 = $arData, !1 = $resString, !2 = $arItemS, !3 = $arDivCodes, !4 = $arDivisions, !5 = $rnum, !6 = $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                                                     ~8, ->55
    7     4    > > FE_RESET_R                                       $9      !0, ->10
          5    > > FE_FETCH_R                                               $9, !2, ->10
          6    >   FETCH_DIM_R                                      ~11     !2, 'Division'
          7        ASSIGN_DIM                                               !3
          8        OP_DATA                                                  ~11
          9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $9
    8    11        INIT_FCALL_BY_NAME                                       'getDivisionsByCodes'
         12        SEND_VAR_EX                                              !3
         13        DO_FCALL                                      0  $12     
         14        ASSIGN                                                   !4, $12
   10    15        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'
   23    16        ASSIGN                                                   !5, 0
   24    17      > FE_RESET_R                                       $16     !0, ->53
         18    > > FE_FETCH_R                                               $16, !6, ->53
   26    19    >   FETCH_DIM_R                                      ~17     !6, 'CODE'
         20        CONCAT                                           ~18     '%3Ctr+decId%3D%22', ~17
         21        CONCAT                                           ~19     ~18, '%22+id%3D%22sid_'
         22        INIT_FCALL                                               'substr'
         23        FETCH_DIM_R                                      ~20     !6, 'ID'
         24        SEND_VAL                                                 ~20
         25        SEND_VAL                                                 -20
         26        DO_ICALL                                         $21     
         27        CONCAT                                           ~22     ~19, $21
         28        CONCAT                                           ~23     ~22, '%22+%3E'
   27    29        CONCAT                                           ~24     ~23, '%3Ctd%3E'
         30        PRE_INC                                          ~25     !5
         31        CONCAT                                           ~26     ~24, ~25
         32        CONCAT                                           ~27     ~26, '%3C%2Ftd%3E'
   28    33        CONCAT                                           ~28     ~27, '%3Ctd+class%3D%27decis%27%3E'
         34        FETCH_DIM_R                                      ~29     !6, 'NAME'
         35        CONCAT                                           ~30     ~28, ~29
         36        CONCAT                                           ~31     ~30, '%3C%2Ftd%3E'
   29    37        CONCAT                                           ~32     ~31, '%3Ctd+class%3D%27gid%27%3E'
         38        FETCH_DIM_R                                      ~33     !6, 'CODE'
         39        CONCAT                                           ~34     ~32, ~33
         40        CONCAT                                           ~35     ~34, '%3C%2Ftd%3E'
   30    41        CONCAT                                           ~36     ~35, '%3Ctd+class%3D%27email%27%3E'
         42        FETCH_DIM_R                                      ~37     !6, 'EMAIL'
         43        CONCAT                                           ~38     ~36, ~37
         44        CONCAT                                           ~39     ~38, '%3C%2Ftd%3E'
   31    45        CONCAT                                           ~40     ~39, '%3Ctd+class%3D%27postnum%27%3E%3Ca+href%3D%27'
         46        FETCH_DIM_R                                      ~41     !6, 'ATT'
         47        CONCAT                                           ~42     ~40, ~41
         48        CONCAT                                           ~43     ~42, '%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'
   32    49        CONCAT                                           ~44     ~43, '%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'
   33    50        CONCAT                                           ~45     ~44, '%3C%2Ftr%3E'
         51        ASSIGN_OP                                     8          !1, ~45
   24    52      > JMP                                                      ->18
         53    >   FE_FREE                                                  $16
   37    54        ASSIGN_OP                                     8          !1, '%3C%2Ftbody%3E%3C%2Ftable%3E'
   39    55    > > RETURN                                                   !1
   40    56*     > RETURN                                                   null

End of function arraytotable

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.8 ms | 1407 KiB | 16 Q