3v4l.org

run code in 300+ PHP versions simultaneously
<?php $checkfor = 'test'; $words = array('test','derp','herp'); for ($i = 1; $i++ < 100000;){ $flipped = array_flip($words); if (isset($flipped[$checkfor])) { echo "match\n"; } } /* if (in_array($checkfor,$words)) { echo "non-flip match"; } */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 4
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 4
Branch analysis from position: 14
Branch analysis from position: 4
Branch analysis from position: 11
filename:       /in/souiX
function name:  (null)
number of ops:  15
compiled vars:  !0 = $checkfor, !1 = $words, !2 = $i, !3 = $flipped
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test'
    3     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->11
    6     4    >   INIT_FCALL                                               'array_flip'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !3, $7
    7     8        ISSET_ISEMPTY_DIM_OBJ                         0          !3, !0
          9      > JMPZ                                                     ~9, ->11
    8    10    >   ECHO                                                     'match%0A'
    5    11    >   POST_INC                                         ~10     !2
         12        IS_SMALLER                                               ~10, 100000
         13      > JMPNZ                                                    ~11, ->4
   15    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.77 ms | 1395 KiB | 15 Q