3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("one", "two", "three"); reset($arr); while (list($key, $value) = each($arr)) { echo "Key: $key; Value: $value<br />\n"; } foreach ($arr as $key => $value) { //echo "Key: $key; Value: $value<br />\n"; switch($key) { case "one": echo $key; } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 5
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 27
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 27
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 5
Branch analysis from position: 19
Branch analysis from position: 5
filename:       /in/OJjoq
function name:  (null)
number of ops:  29
compiled vars:  !0 = $arr, !1 = $key, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'reset'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    4     4      > JMP                                                      ->11
    5     5    >   ROPE_INIT                                     5  ~6      'Key%3A+'
          6        ROPE_ADD                                      1  ~6      ~6, !1
          7        ROPE_ADD                                      2  ~6      ~6, '%3B+Value%3A+'
          8        ROPE_ADD                                      3  ~6      ~6, !2
          9        ROPE_END                                      4  ~5      ~6, '%3Cbr+%2F%3E%0A'
         10        ECHO                                                     ~5
    4    11    >   INIT_FCALL_BY_NAME                                       'each'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $9      
         14        FETCH_LIST_R                                     $10     $9, 0
         15        ASSIGN                                                   !1, $10
         16        FETCH_LIST_R                                     $12     $9, 1
         17        ASSIGN                                                   !2, $12
         18      > JMPNZ                                                    $9, ->5
    8    19    > > FE_RESET_R                                       $14     !0, ->27
         20    > > FE_FETCH_R                                       ~15     $14, !2, ->27
         21    >   ASSIGN                                                   !1, ~15
   12    22        IS_EQUAL                                                 !1, 'one'
         23      > JMPNZ                                                    ~17, ->25
         24    > > JMP                                                      ->26
   13    25    >   ECHO                                                     !1
    8    26    > > JMP                                                      ->20
         27    >   FE_FREE                                                  $14
   16    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.58 ms | 1396 KiB | 15 Q