3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.08 ms | 1395 KiB | 15 Q