3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = new ArrayIterator(get_declared_classes()); $bar = new IteratorIterator($foo); foreach($bar as $class) { echo $class . ' - ' . $bar->getInnerIterator()->current() . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/gS9SJ
function name:  (null)
number of ops:  23
compiled vars:  !0 = $foo, !1 = $bar, !2 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'ArrayIterator'
          1        INIT_FCALL                                               'get_declared_classes'
          2        DO_ICALL                                         $4      
          3        SEND_VAR_NO_REF_EX                                       $4
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
    4     6        NEW                                              $7      'IteratorIterator'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
    6    10      > FE_RESET_R                                       $10     !1, ->21
         11    > > FE_FETCH_R                                               $10, !2, ->21
    7    12    >   CONCAT                                           ~11     !2, '+-+'
         13        INIT_METHOD_CALL                                         !1, 'getInnerIterator'
         14        DO_FCALL                                      0  $12     
         15        INIT_METHOD_CALL                                         $12, 'current'
         16        DO_FCALL                                      0  $13     
         17        CONCAT                                           ~14     ~11, $13
         18        CONCAT                                           ~15     ~14, '%0A'
         19        ECHO                                                     ~15
    6    20      > JMP                                                      ->11
         21    >   FE_FREE                                                  $10
    8    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.48 ms | 1395 KiB | 15 Q