3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.21 ms | 1399 KiB | 18 Q