3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mergeInfos = array( 2=>3 , 4=>3 ,3=>7 ,7=>7); $smallMergeInfos = array(3=>7); foreach ($mergeInfos as $key => $value) { if (array_key_exists($value , $smallMergeInfos)) { $mergeInfos[$key] = $smallMergeInfos[$value]; echo "$key" . "==>>" . "$smallMergeInfos[$value]" . "\n"; } } $campusIds = implode(',' , array_unique(array_values($mergeInfos))); $campus_address_ids = array(1,2,3,4,5,6,7); $campus_address_ids = str_replace(array_keys($mergeInfos) , array_values($mergeInfos) , $campus_address_ids); $campus_address_ids = implode(',' , array_unique($campus_address_ids)); echo $campus_address_ids; echo '32'-'5';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/tj8Fd
function name:  (null)
number of ops:  54
compiled vars:  !0 = $mergeInfos, !1 = $smallMergeInfos, !2 = $value, !3 = $key, !4 = $campusIds, !5 = $campus_address_ids
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2      > FE_RESET_R                                       $8      !0, ->18
          3    > > FE_FETCH_R                                       ~9      $8, !2, ->18
          4    >   ASSIGN                                                   !3, ~9
    5     5        ARRAY_KEY_EXISTS                                         !2, !1
          6      > JMPZ                                                     ~11, ->17
    6     7    >   FETCH_DIM_R                                      ~13     !1, !2
          8        ASSIGN_DIM                                               !0, !3
          9        OP_DATA                                                  ~13
    7    10        CAST                                          6  ~14     !3
         11        CONCAT                                           ~15     ~14, '%3D%3D%3E%3E'
         12        FETCH_DIM_R                                      ~16     !1, !2
         13        CAST                                          6  ~17     ~16
         14        CONCAT                                           ~18     ~15, ~17
         15        CONCAT                                           ~19     ~18, '%0A'
         16        ECHO                                                     ~19
    4    17    > > JMP                                                      ->3
         18    >   FE_FREE                                                  $8
   10    19        INIT_FCALL                                               'implode'
         20        SEND_VAL                                                 '%2C'
         21        INIT_FCALL                                               'array_unique'
         22        INIT_FCALL                                               'array_values'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $20     
         25        SEND_VAR                                                 $20
         26        DO_ICALL                                         $21     
         27        SEND_VAR                                                 $21
         28        DO_ICALL                                         $22     
         29        ASSIGN                                                   !4, $22
   11    30        ASSIGN                                                   !5, <array>
   12    31        INIT_FCALL                                               'str_replace'
         32        INIT_FCALL                                               'array_keys'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $25     
         35        SEND_VAR                                                 $25
         36        INIT_FCALL                                               'array_values'
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                         $26     
         39        SEND_VAR                                                 $26
         40        SEND_VAR                                                 !5
         41        DO_ICALL                                         $27     
         42        ASSIGN                                                   !5, $27
   13    43        INIT_FCALL                                               'implode'
         44        SEND_VAL                                                 '%2C'
         45        INIT_FCALL                                               'array_unique'
         46        SEND_VAR                                                 !5
         47        DO_ICALL                                         $29     
         48        SEND_VAR                                                 $29
         49        DO_ICALL                                         $30     
         50        ASSIGN                                                   !5, $30
   14    51        ECHO                                                     !5
   15    52        ECHO                                                     27
         53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.57 ms | 1400 KiB | 23 Q