3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mediaarray = array( array( 'file_type_id'=>'first file', 'other_stuff'=>'first other' ), array( 'file_type_id'=>'second file', 'other_stuff'=>'second other' ) ); $mediafiletype = array( array( 'id'=>'blabla', 'other'=>'first other' ), array( 'id'=>'second file', 'other'=>'second other' ) ); $baseUrlKeyMediaArray = array(); $NotbaseUrlKeyMediaArray = array(); foreach ($mediaarray as $key => $mavalue) { $match = false; foreach ($mediafiletype as $mftvalue) { if ($mavalue['file_type_id'] == $mftvalue['id']) { $pathname = $mftvalue['base_url']; $baseUrlKeyMediaArray[$pathname] = $mavalue; $match = true; } } if(! $match) { $NotbaseUrlKeyMediaArray[] = $mavalue; } } print_r($baseUrlKeyMediaArray); echo "<br />"; print_r($NotbaseUrlKeyMediaArray);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 26
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 26
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 25
Branch analysis from position: 20
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/au3jV
function name:  (null)
number of ops:  35
compiled vars:  !0 = $mediaarray, !1 = $mediafiletype, !2 = $baseUrlKeyMediaArray, !3 = $NotbaseUrlKeyMediaArray, !4 = $mavalue, !5 = $key, !6 = $match, !7 = $mftvalue, !8 = $pathname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   24     2        ASSIGN                                                   !2, <array>
   25     3        ASSIGN                                                   !3, <array>
   27     4      > FE_RESET_R                                       $13     !0, ->26
          5    > > FE_FETCH_R                                       ~14     $13, !4, ->26
          6    >   ASSIGN                                                   !5, ~14
   29     7        ASSIGN                                                   !6, <false>
   31     8      > FE_RESET_R                                       $17     !1, ->20
          9    > > FE_FETCH_R                                               $17, !7, ->20
   32    10    >   FETCH_DIM_R                                      ~18     !4, 'file_type_id'
         11        FETCH_DIM_R                                      ~19     !7, 'id'
         12        IS_EQUAL                                                 ~18, ~19
         13      > JMPZ                                                     ~20, ->19
   33    14    >   FETCH_DIM_R                                      ~21     !7, 'base_url'
         15        ASSIGN                                                   !8, ~21
   34    16        ASSIGN_DIM                                               !2, !8
         17        OP_DATA                                                  !4
   35    18        ASSIGN                                                   !6, <true>
   31    19    > > JMP                                                      ->9
         20    >   FE_FREE                                                  $17
   38    21        BOOL_NOT                                         ~25     !6
         22      > JMPZ                                                     ~25, ->25
   39    23    >   ASSIGN_DIM                                               !3
         24        OP_DATA                                                  !4
   27    25    > > JMP                                                      ->5
         26    >   FE_FREE                                                  $13
   43    27        INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
   44    30        ECHO                                                     '%3Cbr+%2F%3E'
   45    31        INIT_FCALL                                               'print_r'
         32        SEND_VAR                                                 !3
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.28 ms | 1400 KiB | 15 Q