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"; } ?>
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 = 29
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 29
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
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/KcEl4
function name:  (null)
number of ops:  31
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%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
    7    19    > > FE_RESET_R                                       $14     !0, ->29
         20    > > FE_FETCH_R                                       ~15     $14, !2, ->29
         21    >   ASSIGN                                                   !1, ~15
    8    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%3E%0A'
         27        ECHO                                                     ~17
    7    28      > JMP                                                      ->20
         29    >   FE_FREE                                                  $14
   10    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.17 ms | 1388 KiB | 18 Q