3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = array(10 => 1, "ten" => 2); while(list($k,$v) = each($tmp)){ var_dump("Key: $k and Value: $v"); }
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 = 17, Position 2 = 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 2
Branch analysis from position: 17
Branch analysis from position: 2
filename:       /in/XHUPZ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $tmp, !1 = $k, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->9
    5     2    >   INIT_FCALL                                               'var_dump'
          3        ROPE_INIT                                     4  ~5      'Key%3A+'
          4        ROPE_ADD                                      1  ~5      ~5, !1
          5        ROPE_ADD                                      2  ~5      ~5, '+and+Value%3A+'
          6        ROPE_END                                      3  ~4      ~5, !2
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
    4     9    >   INIT_FCALL_BY_NAME                                       'each'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $8      
         12        FETCH_LIST_R                                     $9      $8, 0
         13        ASSIGN                                                   !1, $9
         14        FETCH_LIST_R                                     $11     $8, 1
         15        ASSIGN                                                   !2, $11
         16      > JMPNZ                                                    $8, ->2
    6    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.66 ms | 1395 KiB | 15 Q