3v4l.org

run code in 300+ PHP versions simultaneously
<?php $information = array("login" => "someUsername", "password" => "somePassword", "card_pin"=>"card_1234", "pin"=>"pin_356", "iin" => "iin_123", "shipping" => array("telephone" => array("value" => "telephone_998")), "cardnumber" => "card_number_876", "customer_id" => "customer_654", "telephone" => "someOtherTelephoneNumber555"); print_r($information); echo "\n\n"; $key_parent = "telephone"; $iterator = new RecursiveIteratorIterator( new RecursiveArrayIterator($information), RecursiveIteratorIterator::SELF_FIRST); foreach ($iterator as $key => $val) { if($key == $key_parent) { $information[$key] = "**"; } else { if(is_array($val)) { //echo "$key:\n"; foreach($val as $k => $v) { if($k == $key_parent) $val[$k] = "**"; } } // else { // echo "$key => $val\n"; // } } } print_r($information);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 34
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 34
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 33
Branch analysis from position: 24
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 32
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 32
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 31
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 32
Branch analysis from position: 33
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/nHYe4
function name:  (null)
number of ops:  39
compiled vars:  !0 = $information, !1 = $key_parent, !2 = $iterator, !3 = $val, !4 = $key, !5 = $v, !6 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   14     4        ECHO                                                     '%0A%0A'
   16     5        ASSIGN                                                   !1, 'telephone'
   17     6        NEW                                              $10     'RecursiveIteratorIterator'
   18     7        NEW                                              $11     'RecursiveArrayIterator'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10        SEND_VAR_NO_REF_EX                                       $11
   19    11        SEND_VAL_EX                                              1
         12        DO_FCALL                                      0          
   17    13        ASSIGN                                                   !2, $10
   21    14      > FE_RESET_R                                       $15     !2, ->34
         15    > > FE_FETCH_R                                       ~16     $15, !3, ->34
         16    >   ASSIGN                                                   !4, ~16
   23    17        IS_EQUAL                                                 !4, !1
         18      > JMPZ                                                     ~18, ->22
   25    19    >   ASSIGN_DIM                                               !0, !4
         20        OP_DATA                                                  '%2A%2A'
         21      > JMP                                                      ->33
   30    22    >   TYPE_CHECK                                  128          !3
         23      > JMPZ                                                     ~20, ->33
   33    24    > > FE_RESET_R                                       $21     !3, ->32
         25    > > FE_FETCH_R                                       ~22     $21, !5, ->32
         26    >   ASSIGN                                                   !6, ~22
   35    27        IS_EQUAL                                                 !6, !1
         28      > JMPZ                                                     ~24, ->31
   36    29    >   ASSIGN_DIM                                               !3, !6
         30        OP_DATA                                                  '%2A%2A'
   33    31    > > JMP                                                      ->25
         32    >   FE_FREE                                                  $21
   21    33    > > JMP                                                      ->15
         34    >   FE_FREE                                                  $15
   46    35        INIT_FCALL                                               'print_r'
         36        SEND_VAR                                                 !0
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.25 ms | 950 KiB | 17 Q