3v4l.org

run code in 300+ PHP versions simultaneously
<?php $response = array(); $formatedData = array(); $labels = array(); $results[] = new stdClass; $results[] = new stdClass; $results[] = new stdClass; $results[] = new stdClass; $results[] = new stdClass; $results[] = new stdClass; $results[] = new stdClass; $results[] = new stdClass; $results[] = new stdClass; $results[] = new stdClass; $results[] = new stdClass; $results[0]->day = "27 Jan"; $results[0]->stats = "DNS"; $results[0]->numAttacks = 4; $results[1]->day = "27 Jan"; $results[1]->stats = "Web"; $results[1]->numAttacks = 5; $results[2]->day = "27 Jan"; $results[2]->stats = "TCP"; $results[2]->numAttacks = 8; $results[3]->day = "28 Jan"; $results[3]->stats = "Web"; $results[3]->numAttacks = 4; $results[4]->day = "28 Jan"; $results[4]->stats = "DNS"; $results[4]->numAttacks = 2; $results[5]->day = "28 Jan"; $results[5]->stats = "TCP"; $results[5]->numAttacks = 6; $results[6]->day = "28 Jan"; $results[6]->stats = "SSL"; $results[6]->numAttacks = 7; $results[7]->day = "28 Jan"; $results[7]->stats = "SQL"; $results[7]->numAttacks = 3; $results[8]->day = "29 Jan"; $results[8]->stats = "Web"; $results[8]->numAttacks = 2; $results[9]->day = "29 Jan"; $results[9]->stats = "SQL"; $results[9]->numAttacks = 6; $results[10]->day = "30 Jan"; $results[10]->stats = "Web"; $results[10]->numAttacks = 8; //print_r($results); foreach ($results as $key => $value) { array_push($labels, "'".$value->day."'"); $formatedData[$value->stats]['numAttacks'][] = $value->numAttacks; $formatedData[$value->stats]['day'][] = $value->day; } //print_r($labels); //print_r($formatedData); $days = count($labels); $i = 1; foreach ($formatedData as $attacktype => $records) { echo $attacktype . "\n"; echo $records['numAttacks']; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 147, Position 2 = 169
Branch analysis from position: 147
2 jumps found. (Code = 78) Position 1 = 148, Position 2 = 169
Branch analysis from position: 148
1 jumps found. (Code = 42) Position 1 = 147
Branch analysis from position: 147
Branch analysis from position: 169
2 jumps found. (Code = 77) Position 1 = 174, Position 2 = 181
Branch analysis from position: 174
2 jumps found. (Code = 78) Position 1 = 175, Position 2 = 181
Branch analysis from position: 175
1 jumps found. (Code = 42) Position 1 = 174
Branch analysis from position: 174
Branch analysis from position: 181
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 181
Branch analysis from position: 169
filename:       /in/46WUh
function name:  (null)
number of ops:  183
compiled vars:  !0 = $response, !1 = $formatedData, !2 = $labels, !3 = $results, !4 = $value, !5 = $key, !6 = $days, !7 = $i, !8 = $records, !9 = $attacktype
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    7     3        NEW                                              $14     'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN_DIM                                               !3
          6        OP_DATA                                                  $14
    8     7        NEW                                              $17     'stdClass'
          8        DO_FCALL                                      0          
          9        ASSIGN_DIM                                               !3
         10        OP_DATA                                                  $17
    9    11        NEW                                              $20     'stdClass'
         12        DO_FCALL                                      0          
         13        ASSIGN_DIM                                               !3
         14        OP_DATA                                                  $20
   10    15        NEW                                              $23     'stdClass'
         16        DO_FCALL                                      0          
         17        ASSIGN_DIM                                               !3
         18        OP_DATA                                                  $23
   11    19        NEW                                              $26     'stdClass'
         20        DO_FCALL                                      0          
         21        ASSIGN_DIM                                               !3
         22        OP_DATA                                                  $26
   12    23        NEW                                              $29     'stdClass'
         24        DO_FCALL                                      0          
         25        ASSIGN_DIM                                               !3
         26        OP_DATA                                                  $29
   13    27        NEW                                              $32     'stdClass'
         28        DO_FCALL                                      0          
         29        ASSIGN_DIM                                               !3
         30        OP_DATA                                                  $32
   14    31        NEW                                              $35     'stdClass'
         32        DO_FCALL                                      0          
         33        ASSIGN_DIM                                               !3
         34        OP_DATA                                                  $35
   15    35        NEW                                              $38     'stdClass'
         36        DO_FCALL                                      0          
         37        ASSIGN_DIM                                               !3
         38        OP_DATA                                                  $38
   16    39        NEW                                              $41     'stdClass'
         40        DO_FCALL                                      0          
         41        ASSIGN_DIM                                               !3
         42        OP_DATA                                                  $41
   17    43        NEW                                              $44     'stdClass'
         44        DO_FCALL                                      0          
         45        ASSIGN_DIM                                               !3
         46        OP_DATA                                                  $44
   19    47        FETCH_DIM_W                                      $46     !3, 0
         48        ASSIGN_OBJ                                               $46, 'day'
         49        OP_DATA                                                  '27+Jan'
   20    50        FETCH_DIM_W                                      $48     !3, 0
         51        ASSIGN_OBJ                                               $48, 'stats'
         52        OP_DATA                                                  'DNS'
   21    53        FETCH_DIM_W                                      $50     !3, 0
         54        ASSIGN_OBJ                                               $50, 'numAttacks'
         55        OP_DATA                                                  4
   23    56        FETCH_DIM_W                                      $52     !3, 1
         57        ASSIGN_OBJ                                               $52, 'day'
         58        OP_DATA                                                  '27+Jan'
   24    59        FETCH_DIM_W                                      $54     !3, 1
         60        ASSIGN_OBJ                                               $54, 'stats'
         61        OP_DATA                                                  'Web'
   25    62        FETCH_DIM_W                                      $56     !3, 1
         63        ASSIGN_OBJ                                               $56, 'numAttacks'
         64        OP_DATA                                                  5
   27    65        FETCH_DIM_W                                      $58     !3, 2
         66        ASSIGN_OBJ                                               $58, 'day'
         67        OP_DATA                                                  '27+Jan'
   28    68        FETCH_DIM_W                                      $60     !3, 2
         69        ASSIGN_OBJ                                               $60, 'stats'
         70        OP_DATA                                                  'TCP'
   29    71        FETCH_DIM_W                                      $62     !3, 2
         72        ASSIGN_OBJ                                               $62, 'numAttacks'
         73        OP_DATA                                                  8
   31    74        FETCH_DIM_W                                      $64     !3, 3
         75        ASSIGN_OBJ                                               $64, 'day'
         76        OP_DATA                                                  '28+Jan'
   32    77        FETCH_DIM_W                                      $66     !3, 3
         78        ASSIGN_OBJ                                               $66, 'stats'
         79        OP_DATA                                                  'Web'
   33    80        FETCH_DIM_W                                      $68     !3, 3
         81        ASSIGN_OBJ                                               $68, 'numAttacks'
         82        OP_DATA                                                  4
   35    83        FETCH_DIM_W                                      $70     !3, 4
         84        ASSIGN_OBJ                                               $70, 'day'
         85        OP_DATA                                                  '28+Jan'
   36    86        FETCH_DIM_W                                      $72     !3, 4
         87        ASSIGN_OBJ                                               $72, 'stats'
         88        OP_DATA                                                  'DNS'
   37    89        FETCH_DIM_W                                      $74     !3, 4
         90        ASSIGN_OBJ                                               $74, 'numAttacks'
         91        OP_DATA                                                  2
   39    92        FETCH_DIM_W                                      $76     !3, 5
         93        ASSIGN_OBJ                                               $76, 'day'
         94        OP_DATA                                                  '28+Jan'
   40    95        FETCH_DIM_W                                      $78     !3, 5
         96        ASSIGN_OBJ                                               $78, 'stats'
         97        OP_DATA                                                  'TCP'
   41    98        FETCH_DIM_W                                      $80     !3, 5
         99        ASSIGN_OBJ                                               $80, 'numAttacks'
        100        OP_DATA                                                  6
   43   101        FETCH_DIM_W                                      $82     !3, 6
        102        ASSIGN_OBJ                                               $82, 'day'
        103        OP_DATA                                                  '28+Jan'
   44   104        FETCH_DIM_W                                      $84     !3, 6
        105        ASSIGN_OBJ                                               $84, 'stats'
        106        OP_DATA                                                  'SSL'
   45   107        FETCH_DIM_W                                      $86     !3, 6
        108        ASSIGN_OBJ                                               $86, 'numAttacks'
        109        OP_DATA                                                  7
   47   110        FETCH_DIM_W                                      $88     !3, 7
        111        ASSIGN_OBJ                                               $88, 'day'
        112        OP_DATA                                                  '28+Jan'
   48   113        FETCH_DIM_W                                      $90     !3, 7
        114        ASSIGN_OBJ                                               $90, 'stats'
        115        OP_DATA                                                  'SQL'
   49   116        FETCH_DIM_W                                      $92     !3, 7
        117        ASSIGN_OBJ                                               $92, 'numAttacks'
        118        OP_DATA                                                  3
   51   119        FETCH_DIM_W                                      $94     !3, 8
        120        ASSIGN_OBJ                                               $94, 'day'
        121        OP_DATA                                                  '29+Jan'
   52   122        FETCH_DIM_W                                      $96     !3, 8
        123        ASSIGN_OBJ                                               $96, 'stats'
        124        OP_DATA                                                  'Web'
   53   125        FETCH_DIM_W                                      $98     !3, 8
        126        ASSIGN_OBJ                                               $98, 'numAttacks'
        127        OP_DATA                                                  2
   55   128        FETCH_DIM_W                                      $100    !3, 9
        129        ASSIGN_OBJ                                               $100, 'day'
        130        OP_DATA                                                  '29+Jan'
   56   131        FETCH_DIM_W                                      $102    !3, 9
        132        ASSIGN_OBJ                                               $102, 'stats'
        133        OP_DATA                                                  'SQL'
   57   134        FETCH_DIM_W                                      $104    !3, 9
        135        ASSIGN_OBJ                                               $104, 'numAttacks'
        136        OP_DATA                                                  6
   59   137        FETCH_DIM_W                                      $106    !3, 10
        138        ASSIGN_OBJ                                               $106, 'day'
        139        OP_DATA                                                  '30+Jan'
   60   140        FETCH_DIM_W                                      $108    !3, 10
        141        ASSIGN_OBJ                                               $108, 'stats'
        142        OP_DATA                                                  'Web'
   61   143        FETCH_DIM_W                                      $110    !3, 10
        144        ASSIGN_OBJ                                               $110, 'numAttacks'
        145        OP_DATA                                                  8
   66   146      > FE_RESET_R                                       $112    !3, ->169
        147    > > FE_FETCH_R                                       ~113    $112, !4, ->169
        148    >   ASSIGN                                                   !5, ~113
   67   149        INIT_FCALL                                               'array_push'
        150        SEND_REF                                                 !2
        151        FETCH_OBJ_R                                      ~115    !4, 'day'
        152        CONCAT                                           ~116    '%27', ~115
        153        CONCAT                                           ~117    ~116, '%27'
        154        SEND_VAL                                                 ~117
        155        DO_ICALL                                                 
   68   156        FETCH_OBJ_R                                      ~119    !4, 'stats'
        157        FETCH_OBJ_R                                      ~123    !4, 'numAttacks'
        158        FETCH_DIM_W                                      $120    !1, ~119
        159        FETCH_DIM_W                                      $121    $120, 'numAttacks'
        160        ASSIGN_DIM                                               $121
        161        OP_DATA                                                  ~123
   69   162        FETCH_OBJ_R                                      ~124    !4, 'stats'
        163        FETCH_OBJ_R                                      ~128    !4, 'day'
        164        FETCH_DIM_W                                      $125    !1, ~124
        165        FETCH_DIM_W                                      $126    $125, 'day'
        166        ASSIGN_DIM                                               $126
        167        OP_DATA                                                  ~128
   66   168      > JMP                                                      ->147
        169    >   FE_FREE                                                  $112
   77   170        COUNT                                            ~129    !2
        171        ASSIGN                                                   !6, ~129
   78   172        ASSIGN                                                   !7, 1
   80   173      > FE_RESET_R                                       $132    !1, ->181
        174    > > FE_FETCH_R                                       ~133    $132, !8, ->181
        175    >   ASSIGN                                                   !9, ~133
   81   176        CONCAT                                           ~135    !9, '%0A'
        177        ECHO                                                     ~135
   82   178        FETCH_DIM_R                                      ~136    !8, 'numAttacks'
        179        ECHO                                                     ~136
   80   180      > JMP                                                      ->174
        181    >   FE_FREE                                                  $132
   89   182      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.27 ms | 1412 KiB | 15 Q