3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = array(); // You store some data using some string keys foreach (array('ab', 'cd', '10', 'gh', '24') as $key) { $c[$key] = 1; } // You pass the array $c to some place else and there you do something like foreach ($c as $k => $v) { if ($k === '10') { echo "found"; exit; } } echo "Not found"; print_r($c);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/XdPj5
function name:  (null)
number of ops:  21
compiled vars:  !0 = $c, !1 = $key, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_R                                       $5      <array>, ->6
          2    > > FE_FETCH_R                                               $5, !1, ->6
    6     3    >   ASSIGN_DIM                                               !0, !1
          4        OP_DATA                                                  1
    5     5      > JMP                                                      ->2
          6    >   FE_FREE                                                  $5
   10     7      > FE_RESET_R                                       $7      !0, ->15
          8    > > FE_FETCH_R                                       ~8      $7, !2, ->15
          9    >   ASSIGN                                                   !3, ~8
   11    10        IS_IDENTICAL                                             !3, '10'
         11      > JMPZ                                                     ~10, ->14
   12    12    >   ECHO                                                     'found'
   13    13      > EXIT                                                     
   10    14    > > JMP                                                      ->8
         15    >   FE_FREE                                                  $7
   16    16        ECHO                                                     'Not+found'
   18    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.97 ms | 1387 KiB | 15 Q