3v4l.org

run code in 500+ PHP versions simultaneously
<?php $rArrayIterator = new RecursiveArrayIterator(array('test1', array('tet3', '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) { 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 = 30
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 30
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 28
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 25
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/msnnF
function name:  (null)
number of ops:  32
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
    3     8        DO_FCALL                                          0          
          9        ASSIGN                                                       !1, $9
    6    10      > FE_RESET_R                                           $12     !1, ->30
         11    > > FE_FETCH_R                                           ~13     $12, !2, ->30
         12    >   ASSIGN                                                       !3, ~13
    8    13        INIT_METHOD_CALL                                             !1, 'hasChildren'
         14        DO_FCALL                                          0  $15     
         15      > JMPZ                                                         $15, ->28
   11    16    >   ECHO                                                         'Children%3A+'
   12    17        INIT_METHOD_CALL                                             !1, 'getChildren'
         18        DO_FCALL                                          0  $16     
         19      > FE_RESET_R                                           $17     $16, ->25
         20    > > FE_FETCH_R                                           ~18     $17, !4, ->25
         21    >   ASSIGN                                                       !5, ~18
   13    22        CONCAT                                               ~20     !4, '+'
         23        ECHO                                                         ~20
   12    24      > JMP                                                          ->20
         25    >   FE_FREE                                                      $17
   15    26        ECHO                                                         '%0A'
    8    27      > JMP                                                          ->29
   17    28    >   ECHO                                                         'No+children%0A'
    6    29    > > JMP                                                          ->11
         30    >   FE_FREE                                                      $12
   20    31      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.19 ms | 3117 KiB | 13 Q