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]; 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 = 12, Position 2 = 22
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 21
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/Lnm9m
function name:  (null)
number of ops:  27
compiled vars:  !0 = $abbreviations, !1 = $states, !2 = $stateMap, !3 = $arr, !4 = $v, !5 = $tmp
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>
    9    11      > FE_RESET_R                                       $12     !3, ->22
         12    > > FE_FETCH_R                                               $12, !4, ->22
   11    13    >   INIT_FCALL                                               'in_array'
         14        SEND_VAR                                                 !4
         15        SEND_VAR                                                 !5
         16        DO_ICALL                                         $13     
         17        BOOL_NOT                                         ~14     $13
         18      > JMPZ                                                     ~14, ->21
   12    19    >   ASSIGN_DIM                                               !5
         20        OP_DATA                                                  !4
    9    21    > > JMP                                                      ->12
         22    >   FE_FREE                                                  $12
   14    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !5
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.29 ms | 1396 KiB | 19 Q