3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_key = "\x00" . uniqid(); $var[$my_key] = 'hi'; foreach($var as $key => $val) { if ($key === $my_key) { 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/RkKeK
function name:  (null)
number of ops:  17
compiled vars:  !0 = $my_key, !1 = $var, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'uniqid'
          1        DO_ICALL                                         $4      
          2        CONCAT                                           ~5      '%00', $4
          3        ASSIGN                                                   !0, ~5
    3     4        ASSIGN_DIM                                               !1, !0
          5        OP_DATA                                                  'hi'
    4     6      > FE_RESET_R                                       $8      !1, ->15
          7    > > FE_FETCH_R                                       ~9      $8, !2, ->15
          8    >   ASSIGN                                                   !3, ~9
    6     9        IS_IDENTICAL                                             !3, !0
         10      > JMPZ                                                     ~11, ->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                                                  $8
   11    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.14 ms | 1395 KiB | 15 Q