3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = ['a' => 'AA', 'b' => 'BB', 'c' => 'CC']; $info = reset($source); var_dump($info); for ($index = 0; $index < 10; $index++) { $info = next($source); if ($info === false) break; var_dump($info); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 10
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 10
Branch analysis from position: 23
Branch analysis from position: 10
filename:       /in/AqTso
function name:  (null)
number of ops:  24
compiled vars:  !0 = $source, !1 = $info, !2 = $index
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                                         $4      
          4        ASSIGN                                                   !1, $4
    4     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    6     8        ASSIGN                                                   !2, 0
          9      > JMP                                                      ->21
    7    10    >   INIT_FCALL                                               'next'
         11        SEND_REF                                                 !0
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !1, $8
    8    14        TYPE_CHECK                                    4          !1
         15      > JMPZ                                                     ~10, ->17
         16    > > JMP                                                      ->23
    9    17    >   INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
    6    20        PRE_INC                                                  !2
         21    >   IS_SMALLER                                               !2, 10
         22      > JMPNZ                                                    ~13, ->10
   10    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.82 ms | 1395 KiB | 19 Q