3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php header('Content-Type: text/html; charset=utf-8'); $arr = array( array( 'text' => 'Текст красного цвета', 'align' => 'center', 'valign' => 'center', 'bgcolor' => '#0000FF', 'colspan' => 2, 'rowspan' => 2, 'width' =>200, 'class' =>'red' ) , array( 'text' => 'Текст зеленого цвета' , 'cells' => '8,9' , 'align' => 'right' , 'valign' => 'bottom' , 'bgcolor' => '#FFFFFF', 'colspan' => 2, 'class' =>'green' )); $array0 = $arr[0]; $array1 = $arr[1]; $firstArray0 = array_shift($array0); $firstArray1 = array_shift($array1); $td1 .= "<td "; foreach ($array0 as $k0 => $v0) { $td1 .= $k0."=".$v0." "; } $td1 .= ">"; $td1 .= $firstArray0; $td1 .= "</td>"; $td2 .= "<td "; foreach ($array1 as $k1 => $v1) { $td2 .= $k1."=".$v1." "; } $td2 .= ">"; $td2 .= $firstArray1; $td2 .= "</td>"; $td = "<td width='100' height='100'></td>"; $table .= "<table>"; for ($i=0, $td1; $i<3; $i++) { $table .= "<tr>"; if ($i == 0) { $table .= $td1; $table .= $td; } elseif ($i == 1) { $table .= $td; } elseif ($i == 2) { $table .= $td; $table .= $td2; } $table .= "</tr>"; } $table .= "</table>"; echo "<!DOCTYPE html>"; echo "<style>td{border: 1px solid black;} .red{color:red} .green{color:green}</style>"; echo $table;
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
Jump found. Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
Jump found. Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 25
Jump found. Position 1 = 31, Position 2 = 38
Branch analysis from position: 31
Jump found. Position 1 = 32, Position 2 = 38
Branch analysis from position: 32
Jump found. Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 38
Jump found. Position 1 = 63
Branch analysis from position: 63
Jump found. Position 1 = 65, Position 2 = 46
Branch analysis from position: 65
Jump found. Position 1 = -2
Branch analysis from position: 46
Jump found. Position 1 = 49, Position 2 = 52
Branch analysis from position: 49
Jump found. Position 1 = 60
Branch analysis from position: 60
Jump found. Position 1 = 65, Position 2 = 46
Branch analysis from position: 65
Branch analysis from position: 46
Branch analysis from position: 52
Jump found. Position 1 = 54, Position 2 = 56
Branch analysis from position: 54
Jump found. Position 1 = 60
Branch analysis from position: 60
Branch analysis from position: 56
Jump found. Position 1 = 58, Position 2 = 60
Branch analysis from position: 58
Jump found. Position 1 = 65, Position 2 = 46
Branch analysis from position: 65
Branch analysis from position: 46
Branch analysis from position: 60
Branch analysis from position: 38
Branch analysis from position: 25
filename:       /in/8hWmu
function name:  (null)
number of ops:  70
compiled vars:  !0 = $arr, !1 = $array0, !2 = $array1, !3 = $firstArray0, !4 = $firstArray1, !5 = $td1, !6 = $v0, !7 = $k0, !8 = $td2, !9 = $v1, !10 = $k1, !11 = $td, !12 = $table, !13 = $i
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   INIT_FCALL                                               'header'
         1        SEND_VAL                                                 'Content-Type%3A+text%2Fhtml%3B+charset%3Dutf-8'
         2        DO_ICALL                                                 
  14     3        ASSIGN                                                   !0, <array>
  23     4        FETCH_DIM_R                                      $16     !0, 0
         5        ASSIGN                                                   !1, $16
  24     6        FETCH_DIM_R                                      $18     !0, 1
         7        ASSIGN                                                   !2, $18
  25     8        INIT_FCALL                                               'array_shift'
         9        SEND_REF                                                 !1
        10        DO_ICALL                                         $20     
        11        ASSIGN                                                   !3, $20
  26    12        INIT_FCALL                                               'array_shift'
        13        SEND_REF                                                 !2
        14        DO_ICALL                                         $22     
        15        ASSIGN                                                   !4, $22
  27    16        ASSIGN_CONCAT                                 0          !5, '%3Ctd+'
  28    17      > FE_RESET_R                                       $25     !1, ->25
        18    > > FE_FETCH_R                                               $25, !6, ->25
        19    >   ASSIGN                                                   !7, ~26
  30    20        CONCAT                                           ~28     !7, '%3D'
        21        CONCAT                                           ~29     ~28, !6
        22        CONCAT                                           ~30     ~29, '+'
        23        ASSIGN_CONCAT                                 0          !5, ~30
        24      > JMP                                                      ->18
        25    >   FE_FREE                                                  $25
  32    26        ASSIGN_CONCAT                                 0          !5, '%3E'
  33    27        ASSIGN_CONCAT                                 0          !5, !3
  34    28        ASSIGN_CONCAT                                 0          !5, '%3C%2Ftd%3E'
  35    29        ASSIGN_CONCAT                                 0          !8, '%3Ctd+'
  36    30      > FE_RESET_R                                       $36     !2, ->38
        31    > > FE_FETCH_R                                               $36, !9, ->38
        32    >   ASSIGN                                                   !10, ~37
  38    33        CONCAT                                           ~39     !10, '%3D'
        34        CONCAT                                           ~40     ~39, !9
        35        CONCAT                                           ~41     ~40, '+'
        36        ASSIGN_CONCAT                                 0          !8, ~41
        37      > JMP                                                      ->31
        38    >   FE_FREE                                                  $36
  40    39        ASSIGN_CONCAT                                 0          !8, '%3E'
  41    40        ASSIGN_CONCAT                                 0          !8, !4
  42    41        ASSIGN_CONCAT                                 0          !8, '%3C%2Ftd%3E'
  43    42        ASSIGN                                                   !11, '%3Ctd+width%3D%27100%27+height%3D%27100%27%3E%3C%2Ftd%3E'
  45    43        ASSIGN_CONCAT                                 0          !12, '%3Ctable%3E'
  46    44        ASSIGN                                                   !13, 0
        45      > JMP                                                      ->63
  48    46    >   ASSIGN_CONCAT                                 0          !12, '%3Ctr%3E'
  49    47        IS_EQUAL                                         ~50     !13, 0
        48      > JMPZ                                                     ~50, ->52
  51    49    >   ASSIGN_CONCAT                                 0          !12, !5
  52    50        ASSIGN_CONCAT                                 0          !12, !11
        51      > JMP                                                      ->60
  54    52    >   IS_EQUAL                                         ~53     !13, 1
        53      > JMPZ                                                     ~53, ->56
  56    54    >   ASSIGN_CONCAT                                 0          !12, !11
        55      > JMP                                                      ->60
  58    56    >   IS_EQUAL                                         ~55     !13, 2
        57      > JMPZ                                                     ~55, ->60
  60    58    >   ASSIGN_CONCAT                                 0          !12, !11
  61    59        ASSIGN_CONCAT                                 0          !12, !8
  63    60    >   ASSIGN_CONCAT                                 0          !12, '%3C%2Ftr%3E'
  46    61        POST_INC                                         ~59     !13
        62        FREE                                                     ~59
        63    >   IS_SMALLER                                       ~60     !13, 3
        64      > JMPNZ                                                    ~60, ->46
  65    65    >   ASSIGN_CONCAT                                 0          !12, '%3C%2Ftable%3E'
  66    66        ECHO                                                     '%3C%21DOCTYPE+html%3E'
  67    67        ECHO                                                     '%3Cstyle%3Etd%7Bborder%3A+1px+solid+black%3B%7D+.red%7Bcolor%3Ared%7D+.green%7Bcolor%3Agreen%7D%3C%2Fstyle%3E'
  68    68        ECHO                                                     !12
        69      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0