3v4l.org

run code in 300+ PHP versions simultaneously
<?php $naflr = array( 0 => "NA", 1 => "A2", 2 => "A2", 3 => "A1", 4 => "A1", 5 => "A1" ); $fuzifikasi = array( 0 => "A2", 1 => "A1", 2 => "A4", 3 => "A1", 4 => "A1", 5 => "A1" ); $result = []; foreach($naflr as $index => $value) { if(isset($fuzifikasi[$index])) { $result[$value][] = $fuzifikasi[$index]; } } var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/L34El
function name:  (null)
number of ops:  18
compiled vars:  !0 = $naflr, !1 = $fuzifikasi, !2 = $result, !3 = $value, !4 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, <array>
   21     2        ASSIGN                                                   !2, <array>
   23     3      > FE_RESET_R                                       $8      !0, ->13
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->13
          5    >   ASSIGN                                                   !4, ~9
   24     6        ISSET_ISEMPTY_DIM_OBJ                         0          !1, !4
          7      > JMPZ                                                     ~11, ->12
   25     8    >   FETCH_DIM_R                                      ~14     !1, !4
          9        FETCH_DIM_W                                      $12     !2, !3
         10        ASSIGN_DIM                                               $12
         11        OP_DATA                                                  ~14
   23    12    > > JMP                                                      ->4
         13    >   FE_FREE                                                  $8
   29    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.07 ms | 1004 KiB | 14 Q