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); if ($a == "one") { $dataset[$a] = "three"; } } var_dump($dataset);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 5
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 5
Branch analysis from position: 20
Branch analysis from position: 5
Branch analysis from position: 15
filename:       /in/CssYJ
function name:  (null)
number of ops:  24
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                                                      ->15
    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, ->15
    9    13    >   ASSIGN_DIM                                               !0, !1
         14        OP_DATA                                                  'three'
    5    15    >   INIT_FCALL                                               'current'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $8      
         18        ASSIGN                                           ~9      !1, $8
         19      > JMPNZ                                                    ~9, ->5
   13    20    >   INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.16 ms | 1395 KiB | 21 Q