3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array(1 => 'a', 2 => 'b', 3 => 'c'); while (list($key, $value) = each($values)) { echo "$key => $value \r\n"; if ($key == 3) { $values[4] = 'd'; } if ($key == 4) { $values[5] = 'e'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 2
Branch analysis from position: 23
Branch analysis from position: 2
Branch analysis from position: 15
Branch analysis from position: 11
filename:       /in/ZFvXg
function name:  (null)
number of ops:  24
compiled vars:  !0 = $values, !1 = $key, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->15
    5     2    >   ROPE_INIT                                     4  ~5      !1
          3        ROPE_ADD                                      1  ~5      ~5, '+%3D%3E+'
          4        ROPE_ADD                                      2  ~5      ~5, !2
          5        ROPE_END                                      3  ~4      ~5, '+%0D%0A'
          6        ECHO                                                     ~4
    6     7        IS_EQUAL                                                 !1, 3
          8      > JMPZ                                                     ~7, ->11
    7     9    >   ASSIGN_DIM                                               !0, 4
         10        OP_DATA                                                  'd'
    9    11    >   IS_EQUAL                                                 !1, 4
         12      > JMPZ                                                     ~9, ->15
   10    13    >   ASSIGN_DIM                                               !0, 5
         14        OP_DATA                                                  'e'
    4    15    >   INIT_FCALL_BY_NAME                                       'each'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0  $11     
         18        FETCH_LIST_R                                     $12     $11, 0
         19        ASSIGN                                                   !1, $12
         20        FETCH_LIST_R                                     $14     $11, 1
         21        ASSIGN                                                   !2, $14
         22      > JMPNZ                                                    $11, ->2
   12    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.57 ms | 1394 KiB | 13 Q