3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a['10'] = 'abc'; $a['a'] = 'cde'; foreach ($a as $k=>$v) { if ($k === '10') { echo "found"; } } //The above code the '10' key gets silently gets converted to integer key 10. So when iterating over the dictionary using the keys, the key is never '10'.
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/GIn4Kt
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0, 10
          2        OP_DATA                                                  'abc'
    5     3        ASSIGN_DIM                                               !0, 'a'
          4        OP_DATA                                                  'cde'
    7     5      > FE_RESET_R                                       $6      !0, ->12
          6    > > FE_FETCH_R                                       ~7      $6, !1, ->12
          7    >   ASSIGN                                                   !2, ~7
    8     8        IS_IDENTICAL                                             !2, '10'
          9      > JMPZ                                                     ~9, ->11
    9    10    >   ECHO                                                     'found'
    7    11    > > JMP                                                      ->6
         12    >   FE_FREE                                                  $6
   12    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.87 ms | 1397 KiB | 13 Q