3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dataset = array("a" => "one", "b" => "two"); reset($dataset); while ($a = current($dataset)) { var_dump($a); next($dataset); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 5
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 5
Branch analysis from position: 16
Branch analysis from position: 5
filename:       /in/s2L1W
function name:  (null)
number of ops:  17
compiled vars:  !0 = $dataset, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'reset'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    5     4      > JMP                                                      ->11
    6     5    >   INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'next'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                                 
    5    11    >   INIT_FCALL                                               'current'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        ASSIGN                                           ~7      !1, $6
         15      > JMPNZ                                                    ~7, ->5
    8    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.55 ms | 1395 KiB | 21 Q