3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rArrayIterator = new RecursiveArrayIterator(array('test1', array('test3', 'test4', 'test5'))); $rRegexIterator = new RecursiveRegexIterator($rArrayIterator, '/^test/', RecursiveRegexIterator::ALL_MATCHES); foreach ($rRegexIterator as $key1 => $value1) { if ($rRegexIterator->hasChildren()) { // print all children echo "Children: "; foreach ($rRegexIterator->getChildren() as $key => $value) { var_dump($value); echo $value . " "; } echo "\n"; } else { echo "No children\n"; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 33
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 33
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 31
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 28
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 28
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 28
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/iMv5n
function name:  (null)
number of ops:  35
compiled vars:  !0 = $rArrayIterator, !1 = $rRegexIterator, !2 = $value1, !3 = $key1, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $6      'RecursiveArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $6
    3     4        NEW                                              $9      'RecursiveRegexIterator'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              '%2F%5Etest%2F'
    4     7        SEND_VAL_EX                                              2
          8        DO_FCALL                                      0          
    3     9        ASSIGN                                                   !1, $9
    6    10      > FE_RESET_R                                       $12     !1, ->33
         11    > > FE_FETCH_R                                       ~13     $12, !2, ->33
         12    >   ASSIGN                                                   !3, ~13
    8    13        INIT_METHOD_CALL                                         !1, 'hasChildren'
         14        DO_FCALL                                      0  $15     
         15      > JMPZ                                                     $15, ->31
   11    16    >   ECHO                                                     'Children%3A+'
   12    17        INIT_METHOD_CALL                                         !1, 'getChildren'
         18        DO_FCALL                                      0  $16     
         19      > FE_RESET_R                                       $17     $16, ->28
         20    > > FE_FETCH_R                                       ~18     $17, !4, ->28
         21    >   ASSIGN                                                   !5, ~18
   13    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                                 
   14    25        CONCAT                                           ~21     !4, '+'
         26        ECHO                                                     ~21
   12    27      > JMP                                                      ->20
         28    >   FE_FREE                                                  $17
   16    29        ECHO                                                     '%0A'
         30      > JMP                                                      ->32
   18    31    >   ECHO                                                     'No+children%0A'
    6    32    > > JMP                                                      ->11
         33    >   FE_FREE                                                  $12
   22    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.86 ms | 1400 KiB | 15 Q