3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.78 ms | 1386 KiB | 13 Q