3v4l.org

run code in 300+ PHP versions simultaneously
<?php $checkfor = 'test'; $words = array('test','derp','herp'); function noop(){} for ($i = 1; $i++ < 100000;){ $flipped = array_flip($words); if (isset($flipped[$checkfor])) { noop(); } } /* if (in_array($checkfor,$words)) { echo "non-flip match"; } */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
Branch analysis from position: 12
filename:       /in/ilH8f
function name:  (null)
number of ops:  16
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>
    7     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->12
    8     4    >   INIT_FCALL                                               'array_flip'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !3, $7
    9     8        ISSET_ISEMPTY_DIM_OBJ                         0          !3, !0
          9      > JMPZ                                                     ~9, ->12
   10    10    >   INIT_FCALL                                               'noop'
         11        DO_FCALL                                      0          
    7    12    >   POST_INC                                         ~11     !2
         13        IS_SMALLER                                               ~11, 100000
         14      > JMPNZ                                                    ~12, ->4
   17    15    > > RETURN                                                   1

Function noop:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ilH8f
function name:  noop
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of function noop

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.36 ms | 1402 KiB | 16 Q