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 = 33
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 33
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
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/AUYuQ
function name:  (null)
number of ops:  35
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, ->33
         20    > > FE_FETCH_R                                       ~15     $14, !2, ->33
         21    >   ASSIGN                                                   !1, ~15
    9    22        ROPE_INIT                                     5  ~18     'Key%3A+'
         23        ROPE_ADD                                      1  ~18     ~18, !1
         24        ROPE_ADD                                      2  ~18     ~18, '%3B+Value%3A+'
         25        ROPE_ADD                                      3  ~18     ~18, !2
         26        ROPE_END                                      4  ~17     ~18, '%3Cbr+%2F%3E%0A'
         27        ECHO                                                     ~17
   12    28        IS_EQUAL                                                 !1, 'one'
         29      > JMPNZ                                                    ~21, ->31
         30    > > JMP                                                      ->32
   13    31    >   ECHO                                                     !1
    8    32    > > JMP                                                      ->20
         33    >   FE_FREE                                                  $14
   16    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.34 ms | 1400 KiB | 15 Q