3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = array(10 => 1, "ten" => 2); while(list($k,$v) = each($tmp)){ var_dump("$k,$v,$k => $v"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 2
Branch analysis from position: 20
Branch analysis from position: 2
filename:       /in/cKanM
function name:  (null)
number of ops:  21
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                                                      ->12
    5     2    >   INIT_FCALL                                               'var_dump'
          3        ROPE_INIT                                     7  ~5      !1
          4        ROPE_ADD                                      1  ~5      ~5, '%2C'
          5        ROPE_ADD                                      2  ~5      ~5, !2
          6        ROPE_ADD                                      3  ~5      ~5, '%2C'
          7        ROPE_ADD                                      4  ~5      ~5, !1
          8        ROPE_ADD                                      5  ~5      ~5, '+%3D%3E+'
          9        ROPE_END                                      6  ~4      ~5, !2
         10        SEND_VAL                                                 ~4
         11        DO_ICALL                                                 
    4    12    >   INIT_FCALL_BY_NAME                                       'each'
         13        SEND_VAR_EX                                              !0
         14        DO_FCALL                                      0  $10     
         15        FETCH_LIST_R                                     $11     $10, 0
         16        ASSIGN                                                   !1, $11
         17        FETCH_LIST_R                                     $13     $10, 1
         18        ASSIGN                                                   !2, $13
         19      > JMPNZ                                                    $10, ->2
    6    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
209.98 ms | 1395 KiB | 18 Q