3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('property1' => 'foo', 'property2' => array('foo1', 'foo2') ); $arrayobject = new ArrayObject($array); $iterator = $arrayobject->getIterator(); while($iterator->valid()) { if(is_array($iterator->current())){ $arrayobject_2 = new ArrayObject($iterator->current()); $it = $arrayobject_2->getIterator(); while($it->valid()) { echo $it->key() . ' => ' . $it->current() . "\n"; $it->next(); } } else echo $iterator->key() . ' => ' . $iterator->current() . "\n"; $iterator->next(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 9
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 37
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 23
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 9
Branch analysis from position: 50
Branch analysis from position: 9
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 23
Branch analysis from position: 36
Branch analysis from position: 23
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 9
Branch analysis from position: 50
Branch analysis from position: 9
filename:       /in/1eS3Q
function name:  (null)
number of ops:  51
compiled vars:  !0 = $array, !1 = $arrayobject, !2 = $iterator, !3 = $arrayobject_2, !4 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    6     1        NEW                                              $6      'ArrayObject'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $6
    8     5        INIT_METHOD_CALL                                         !1, 'getIterator'
          6        DO_FCALL                                      0  $9      
          7        ASSIGN                                                   !2, $9
   10     8      > JMP                                                      ->47
   11     9    >   INIT_METHOD_CALL                                         !2, 'current'
         10        DO_FCALL                                      0  $11     
         11        TYPE_CHECK                                  128          $11
         12      > JMPZ                                                     ~12, ->37
   12    13    >   NEW                                              $13     'ArrayObject'
         14        INIT_METHOD_CALL                                         !2, 'current'
         15        DO_FCALL                                      0  $14     
         16        SEND_VAR_NO_REF_EX                                       $14
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !3, $13
   13    19        INIT_METHOD_CALL                                         !3, 'getIterator'
         20        DO_FCALL                                      0  $17     
         21        ASSIGN                                                   !4, $17
   14    22      > JMP                                                      ->33
   15    23    >   INIT_METHOD_CALL                                         !4, 'key'
         24        DO_FCALL                                      0  $19     
         25        CONCAT                                           ~20     $19, '+%3D%3E+'
         26        INIT_METHOD_CALL                                         !4, 'current'
         27        DO_FCALL                                      0  $21     
         28        CONCAT                                           ~22     ~20, $21
         29        CONCAT                                           ~23     ~22, '%0A'
         30        ECHO                                                     ~23
   16    31        INIT_METHOD_CALL                                         !4, 'next'
         32        DO_FCALL                                      0          
   14    33    >   INIT_METHOD_CALL                                         !4, 'valid'
         34        DO_FCALL                                      0  $25     
         35      > JMPNZ                                                    $25, ->23
   11    36    > > JMP                                                      ->45
   19    37    >   INIT_METHOD_CALL                                         !2, 'key'
         38        DO_FCALL                                      0  $26     
         39        CONCAT                                           ~27     $26, '+%3D%3E+'
         40        INIT_METHOD_CALL                                         !2, 'current'
         41        DO_FCALL                                      0  $28     
         42        CONCAT                                           ~29     ~27, $28
         43        CONCAT                                           ~30     ~29, '%0A'
         44        ECHO                                                     ~30
   20    45    >   INIT_METHOD_CALL                                         !2, 'next'
         46        DO_FCALL                                      0          
   10    47    >   INIT_METHOD_CALL                                         !2, 'valid'
         48        DO_FCALL                                      0  $32     
         49      > JMPNZ                                                    $32, ->9
   21    50    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.11 ms | 1002 KiB | 13 Q