3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = new ArrayObject(array(1, 2)); $it = $array->getIterator(); while ($it->valid()) { $it->next(); echo $it->offsetGet(0); } $it->append(array(3)); echo $it->valid() ? $it->current() : "not valid";
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 = 17, Position 2 = 8
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
Branch analysis from position: 8
filename:       /in/m7TIZ
function name:  (null)
number of ops:  30
compiled vars:  !0 = $array, !1 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'ArrayObject'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    5     4        INIT_METHOD_CALL                                         !0, 'getIterator'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
    7     7      > JMP                                                      ->14
    9     8    >   INIT_METHOD_CALL                                         !1, 'next'
          9        DO_FCALL                                      0          
   11    10        INIT_METHOD_CALL                                         !1, 'offsetGet'
         11        SEND_VAL_EX                                              0
         12        DO_FCALL                                      0  $8      
         13        ECHO                                                     $8
    7    14    >   INIT_METHOD_CALL                                         !1, 'valid'
         15        DO_FCALL                                      0  $9      
         16      > JMPNZ                                                    $9, ->8
   14    17    >   INIT_METHOD_CALL                                         !1, 'append'
         18        SEND_VAL_EX                                              <array>
         19        DO_FCALL                                      0          
   16    20        INIT_METHOD_CALL                                         !1, 'valid'
         21        DO_FCALL                                      0  $11     
         22      > JMPZ                                                     $11, ->27
         23    >   INIT_METHOD_CALL                                         !1, 'current'
         24        DO_FCALL                                      0  $12     
         25        QM_ASSIGN                                        ~13     $12
         26      > JMP                                                      ->28
         27    >   QM_ASSIGN                                        ~13     'not+valid'
         28    >   ECHO                                                     ~13
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.49 ms | 1395 KiB | 13 Q