3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'a' => 'apple', 'b' => 'banana', 'c' => 'cherry' ]; while (list($var, $val) = each($arr)) { echo "$var is $val" . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 2
Branch analysis from position: 15
Branch analysis from position: 2
filename:       /in/AeHGM
function name:  (null)
number of ops:  16
compiled vars:  !0 = $arr, !1 = $var, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1      > JMP                                                      ->7
    8     2    >   ROPE_INIT                                     3  ~5      !1
          3        ROPE_ADD                                      1  ~5      ~5, '+is+'
          4        ROPE_END                                      2  ~4      ~5, !2
          5        CONCAT                                           ~7      ~4, '%0A'
          6        ECHO                                                     ~7
    7     7    >   INIT_FCALL_BY_NAME                                       'each'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $8      
         10        FETCH_LIST_R                                     $9      $8, 0
         11        ASSIGN                                                   !1, $9
         12        FETCH_LIST_R                                     $11     $8, 1
         13        ASSIGN                                                   !2, $11
         14      > JMPNZ                                                    $8, ->2
    9    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.68 ms | 1394 KiB | 13 Q