3v4l.org

run code in 300+ PHP versions simultaneously
<?php $abbreviations = array("AL","AK","AZ","AR"); $states = array("Alabama","Alaska","Arizona","Arkansas"); $stateMap = array_combine($abbreviations,$states); print_r($stateMap); $arr =[1,3,5,7,3,5,7];$tmp=[]; foreach($arr as $v ){ if(!in_array($v,$tmp)){ $tmp[]=$v; } }print_r($tmp);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 23
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 23
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 22
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/kucdE
function name:  (null)
number of ops:  28
compiled vars:  !0 = $abbreviations, !1 = $states, !2 = $stateMap, !3 = $arr, !4 = $tmp, !5 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'array_combine'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !2, $8
    6     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
    8    10        ASSIGN                                                   !3, <array>
         11        ASSIGN                                                   !4, <array>
    9    12      > FE_RESET_R                                       $13     !3, ->23
         13    > > FE_FETCH_R                                               $13, !5, ->23
   11    14    >   INIT_FCALL                                               'in_array'
         15        SEND_VAR                                                 !5
         16        SEND_VAR                                                 !4
         17        DO_ICALL                                         $14     
         18        BOOL_NOT                                         ~15     $14
         19      > JMPZ                                                     ~15, ->22
   12    20    >   ASSIGN_DIM                                               !4
         21        OP_DATA                                                  !5
    9    22    > > JMP                                                      ->13
         23    >   FE_FREE                                                  $13
   14    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.14 ms | 1396 KiB | 19 Q