3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rows[10] = array('01','8:50','I','CASA','1'); $rows[9] = array('01','8:50','I','CASA','0'); $rows[8] = array('01','8:30','I','CASA','0'); $rows[7] = array('01','8:50','I','CASA','1'); $rows[6] = array('01','8:50','I','CASA','0'); $rows[5] = array('01','8:00','I','CASA','0'); $rows[4] = array('01','7:50','I','CASA','1'); $rows[3] = array('01','7:50','I','CASA','0'); $rows[2] = array('01','7:45','I','CASA','0'); $rows[1] = array('01','7:30','I','CASA','0'); echo "originale<br>"; foreach ($rows as $k => $v) { echo "$k) "; foreach($v as $kk => $vv) { echo $vv ." | "; } echo "<br>"; } foreach ($rows as $k => $v) { if($v[4] == 1) { $keys_to_remove[] = $k-1; } } echo "<pre>"; print_r($keys_to_remove); echo "</pre>"; foreach($keys_to_remove as $key){ unset($rows[$key]); } echo "modificato<br>"; foreach ($rows as $k => $v) { echo "$k) "; foreach($v as $kk => $vv) { echo $vv ." | "; } echo "<br>"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 36
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 36
Branch analysis from position: 23
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 33
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 33
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 33
Branch analysis from position: 36
2 jumps found. (Code = 77) Position 1 = 38, Position 2 = 47
Branch analysis from position: 38
2 jumps found. (Code = 78) Position 1 = 39, Position 2 = 47
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 46
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 46
Branch analysis from position: 47
2 jumps found. (Code = 77) Position 1 = 54, Position 2 = 57
Branch analysis from position: 54
2 jumps found. (Code = 78) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
Branch analysis from position: 57
2 jumps found. (Code = 77) Position 1 = 60, Position 2 = 74
Branch analysis from position: 60
2 jumps found. (Code = 78) Position 1 = 61, Position 2 = 74
Branch analysis from position: 61
2 jumps found. (Code = 77) Position 1 = 66, Position 2 = 71
Branch analysis from position: 66
2 jumps found. (Code = 78) Position 1 = 67, Position 2 = 71
Branch analysis from position: 67
1 jumps found. (Code = 42) Position 1 = 66
Branch analysis from position: 66
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 60
Branch analysis from position: 60
Branch analysis from position: 71
Branch analysis from position: 74
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 74
Branch analysis from position: 57
Branch analysis from position: 47
Branch analysis from position: 36
filename:       /in/dpp6k
function name:  (null)
number of ops:  76
compiled vars:  !0 = $rows, !1 = $v, !2 = $k, !3 = $vv, !4 = $kk, !5 = $keys_to_remove, !6 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN_DIM                                               !0, 10
          1        OP_DATA                                                  <array>
    5     2        ASSIGN_DIM                                               !0, 9
          3        OP_DATA                                                  <array>
    6     4        ASSIGN_DIM                                               !0, 8
          5        OP_DATA                                                  <array>
    7     6        ASSIGN_DIM                                               !0, 7
          7        OP_DATA                                                  <array>
    8     8        ASSIGN_DIM                                               !0, 6
          9        OP_DATA                                                  <array>
    9    10        ASSIGN_DIM                                               !0, 5
         11        OP_DATA                                                  <array>
   10    12        ASSIGN_DIM                                               !0, 4
         13        OP_DATA                                                  <array>
   11    14        ASSIGN_DIM                                               !0, 3
         15        OP_DATA                                                  <array>
   12    16        ASSIGN_DIM                                               !0, 2
         17        OP_DATA                                                  <array>
   13    18        ASSIGN_DIM                                               !0, 1
         19        OP_DATA                                                  <array>
   15    20        ECHO                                                     'originale%3Cbr%3E'
   16    21      > FE_RESET_R                                       $17     !0, ->36
         22    > > FE_FETCH_R                                       ~18     $17, !1, ->36
         23    >   ASSIGN                                                   !2, ~18
   18    24        NOP                                                      
         25        FAST_CONCAT                                      ~20     !2, '%29+'
         26        ECHO                                                     ~20
   19    27      > FE_RESET_R                                       $21     !1, ->33
         28    > > FE_FETCH_R                                       ~22     $21, !3, ->33
         29    >   ASSIGN                                                   !4, ~22
   21    30        CONCAT                                           ~24     !3, '+%7C+'
         31        ECHO                                                     ~24
   19    32      > JMP                                                      ->28
         33    >   FE_FREE                                                  $21
   23    34        ECHO                                                     '%3Cbr%3E'
   16    35      > JMP                                                      ->22
         36    >   FE_FREE                                                  $17
   26    37      > FE_RESET_R                                       $25     !0, ->47
         38    > > FE_FETCH_R                                       ~26     $25, !1, ->47
         39    >   ASSIGN                                                   !2, ~26
   28    40        FETCH_DIM_R                                      ~28     !1, 4
         41        IS_EQUAL                                                 ~28, 1
         42      > JMPZ                                                     ~29, ->46
   30    43    >   SUB                                              ~31     !2, 1
         44        ASSIGN_DIM                                               !5
         45        OP_DATA                                                  ~31
   26    46    > > JMP                                                      ->38
         47    >   FE_FREE                                                  $25
   35    48        ECHO                                                     '%3Cpre%3E'
   36    49        INIT_FCALL                                               'print_r'
         50        SEND_VAR                                                 !5
         51        DO_ICALL                                                 
   37    52        ECHO                                                     '%3C%2Fpre%3E'
   39    53      > FE_RESET_R                                       $33     !5, ->57
         54    > > FE_FETCH_R                                               $33, !6, ->57
   40    55    >   UNSET_DIM                                                !0, !6
   39    56      > JMP                                                      ->54
         57    >   FE_FREE                                                  $33
   43    58        ECHO                                                     'modificato%3Cbr%3E'
   44    59      > FE_RESET_R                                       $34     !0, ->74
         60    > > FE_FETCH_R                                       ~35     $34, !1, ->74
         61    >   ASSIGN                                                   !2, ~35
   46    62        NOP                                                      
         63        FAST_CONCAT                                      ~37     !2, '%29+'
         64        ECHO                                                     ~37
   47    65      > FE_RESET_R                                       $38     !1, ->71
         66    > > FE_FETCH_R                                       ~39     $38, !3, ->71
         67    >   ASSIGN                                                   !4, ~39
   49    68        CONCAT                                           ~41     !3, '+%7C+'
         69        ECHO                                                     ~41
   47    70      > JMP                                                      ->66
         71    >   FE_FREE                                                  $38
   51    72        ECHO                                                     '%3Cbr%3E'
   44    73      > JMP                                                      ->60
         74    >   FE_FREE                                                  $34
   52    75      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.88 ms | 1404 KiB | 15 Q