3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input_arr= array( 0=>array("india0","srilanka1","pakistan0","banglades0"), 1=>array("india1","srilanka1","pakistan1","bangladesh1"), 2=>array("india2","srilanka2","pakistan2","bangladesh2"), 3=>array("india3","srilanka3","pakistan3","bangladesh3"), 4=>array("india4","srilanka4","pakistan4","bangladesh4"), 5=>array("india5","srilanka5","pakistan5","bangladesh5"), ); $result_arr= array(); for($i=0;$i<sizeof($input_arr);$i++) { if(in_array("banglades0",$input_arr[$i])) if(in_array("india0",$input_arr[$i])) $result_arr = $input_arr[$i]; } print_r($result_arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 4
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 4
Branch analysis from position: 22
Branch analysis from position: 4
Branch analysis from position: 18
Branch analysis from position: 18
filename:       /in/pqssT
function name:  (null)
number of ops:  26
compiled vars:  !0 = $input_arr, !1 = $result_arr, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   11     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->19
   13     4    >   INIT_FCALL                                               'in_array'
          5        SEND_VAL                                                 'banglades0'
          6        FETCH_DIM_R                                      ~6      !0, !2
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                         $7      
          9      > JMPZ                                                     $7, ->18
   14    10    >   INIT_FCALL                                               'in_array'
         11        SEND_VAL                                                 'india0'
         12        FETCH_DIM_R                                      ~8      !0, !2
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                         $9      
         15      > JMPZ                                                     $9, ->18
   15    16    >   FETCH_DIM_R                                      ~10     !0, !2
         17        ASSIGN                                                   !1, ~10
   11    18    >   PRE_INC                                                  !2
         19    >   COUNT                                            ~13     !0
         20        IS_SMALLER                                               !2, ~13
         21      > JMPNZ                                                    ~14, ->4
   17    22    >   INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.91 ms | 1388 KiB | 17 Q