3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mykey = uniqid("\x00"); $var[$mykey] = TRUE; foreach($var as $key => $val) { if ($key === $mykey) { echo 'You got it right'; } else { echo 'You got it wrong'; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/KFrtQ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $mykey, !1 = $var, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'uniqid'
          1        SEND_VAL                                                 '%00'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    3     4        ASSIGN_DIM                                               !1, !0
          5        OP_DATA                                                  <true>
    4     6      > FE_RESET_R                                       $7      !1, ->15
          7    > > FE_FETCH_R                                       ~8      $7, !2, ->15
          8    >   ASSIGN                                                   !3, ~8
    6     9        IS_IDENTICAL                                             !3, !0
         10      > JMPZ                                                     ~10, ->13
    7    11    >   ECHO                                                     'You+got+it+right'
         12      > JMP                                                      ->14
    9    13    >   ECHO                                                     'You+got+it+wrong'
    4    14    > > JMP                                                      ->7
         15    >   FE_FREE                                                  $7
   11    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.39 ms | 1399 KiB | 15 Q