3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray=array('aa','bb','cc','dd'); while (list ($key, $val) = each ($myArray) ) echo $val; reset($myArray); while (list ($key, $val) = each ($myArray) ) echo $val;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 15
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 15
Branch analysis from position: 24
Branch analysis from position: 15
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 2
Branch analysis from position: 11
Branch analysis from position: 2
filename:       /in/OcjvT
function name:  (null)
number of ops:  25
compiled vars:  !0 = $myArray, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->3
          2    >   ECHO                                                     !1
          3    >   INIT_FCALL_BY_NAME                                       'each'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $4      
          6        FETCH_LIST_R                                     $5      $4, 0
          7        ASSIGN                                                   !2, $5
          8        FETCH_LIST_R                                     $7      $4, 1
          9        ASSIGN                                                   !1, $7
         10      > JMPNZ                                                    $4, ->2
    5    11    >   INIT_FCALL                                               'reset'
         12        SEND_REF                                                 !0
         13        DO_ICALL                                                 
    6    14      > JMP                                                      ->16
         15    >   ECHO                                                     !1
         16    >   INIT_FCALL_BY_NAME                                       'each'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $10     
         19        FETCH_LIST_R                                     $11     $10, 0
         20        ASSIGN                                                   !2, $11
         21        FETCH_LIST_R                                     $13     $10, 1
         22        ASSIGN                                                   !1, $13
         23      > JMPNZ                                                    $10, ->15
         24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.77 ms | 1396 KiB | 18 Q