3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dots_arr=array(); $row_array = array();$row_array['ip'] = '1.1.1.1';$row_array['dip'] = '2.2.2.2';array_push($dots_arr,$row_array); $row_array = array();$row_array['ip'] = '2.1.1.1';$row_array['dip'] = '1.2.2.2';array_push($dots_arr,$row_array); $row_array = array();$row_array['ip'] = '1.1.1.1';$row_array['dip'] = '2.2.2.2';array_push($dots_arr,$row_array); $row_array = array();$row_array['ip'] = '3.1.1.1';$row_array['dip'] = '1.2.2.2';array_push($dots_arr,$row_array); print_r($dots_arr); $sub_dots=array('sip'=>'1.1.1.1'); $sip='1.1.1.1'; foreach($dots_arr as $key => $row) { if(strcmp($row['ip'],'1.1.1.1')==0){ print $key; unset($dots_arr[$key]); } } print_r($dots_arr); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 43, Position 2 = 55
Branch analysis from position: 43
2 jumps found. (Code = 78) Position 1 = 44, Position 2 = 55
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 54
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
Branch analysis from position: 54
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
filename:       /in/7ndaa
function name:  (null)
number of ops:  60
compiled vars:  !0 = $dots_arr, !1 = $row_array, !2 = $sub_dots, !3 = $sip, !4 = $row, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
          2        ASSIGN_DIM                                               !1, 'ip'
          3        OP_DATA                                                  '1.1.1.1'
          4        ASSIGN_DIM                                               !1, 'dip'
          5        OP_DATA                                                  '2.2.2.2'
          6        INIT_FCALL                                               'array_push'
          7        SEND_REF                                                 !0
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    4    10        ASSIGN                                                   !1, <array>
         11        ASSIGN_DIM                                               !1, 'ip'
         12        OP_DATA                                                  '2.1.1.1'
         13        ASSIGN_DIM                                               !1, 'dip'
         14        OP_DATA                                                  '1.2.2.2'
         15        INIT_FCALL                                               'array_push'
         16        SEND_REF                                                 !0
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
    5    19        ASSIGN                                                   !1, <array>
         20        ASSIGN_DIM                                               !1, 'ip'
         21        OP_DATA                                                  '1.1.1.1'
         22        ASSIGN_DIM                                               !1, 'dip'
         23        OP_DATA                                                  '2.2.2.2'
         24        INIT_FCALL                                               'array_push'
         25        SEND_REF                                                 !0
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
    6    28        ASSIGN                                                   !1, <array>
         29        ASSIGN_DIM                                               !1, 'ip'
         30        OP_DATA                                                  '3.1.1.1'
         31        ASSIGN_DIM                                               !1, 'dip'
         32        OP_DATA                                                  '1.2.2.2'
         33        INIT_FCALL                                               'array_push'
         34        SEND_REF                                                 !0
         35        SEND_VAR                                                 !1
         36        DO_ICALL                                                 
    7    37        INIT_FCALL                                               'print_r'
         38        SEND_VAR                                                 !0
         39        DO_ICALL                                                 
    8    40        ASSIGN                                                   !2, <array>
   10    41        ASSIGN                                                   !3, '1.1.1.1'
   11    42      > FE_RESET_R                                       $26     !0, ->55
         43    > > FE_FETCH_R                                       ~27     $26, !4, ->55
         44    >   ASSIGN                                                   !5, ~27
   13    45        INIT_FCALL                                               'strcmp'
         46        FETCH_DIM_R                                      ~29     !4, 'ip'
         47        SEND_VAL                                                 ~29
         48        SEND_VAL                                                 '1.1.1.1'
         49        DO_ICALL                                         $30     
         50        IS_EQUAL                                                 $30, 0
         51      > JMPZ                                                     ~31, ->54
   14    52    >   ECHO                                                     !5
   15    53        UNSET_DIM                                                !0, !5
   11    54    > > JMP                                                      ->43
         55    >   FE_FREE                                                  $26
   19    56        INIT_FCALL                                               'print_r'
         57        SEND_VAR                                                 !0
         58        DO_ICALL                                                 
   20    59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.32 ms | 1392 KiB | 19 Q