3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dataset = array(0 => "one", 1 => "two"); reset($dataset); while ($a = current($dataset)) { var_dump($a); next($dataset); if ($a == "one") { unset($dataset[0]); } } var_dump($dataset);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 5
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 5
Branch analysis from position: 19
Branch analysis from position: 5
Branch analysis from position: 14
filename:       /in/EubRi
function name:  (null)
number of ops:  23
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                                                      ->14
    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                                                 
    8    11        IS_EQUAL                                                 !1, 'one'
         12      > JMPZ                                                     ~6, ->14
    9    13    >   UNSET_DIM                                                !0, 0
    5    14    >   INIT_FCALL                                               'current'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        ASSIGN                                           ~8      !1, $7
         18      > JMPNZ                                                    ~8, ->5
   13    19    >   INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.49 ms | 1395 KiB | 21 Q