3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rArrayIterator = new RecursiveArrayIterator(array('test1', array('tet3', 'test4', 'test5'))); $rRegexIterator = new RecursiveRegexIterator($rArrayIterator, '/^(t)e(s)t/', RecursiveRegexIterator::ALL_MATCHES, 0, PREG_PATTERN_ORDER); foreach ($rRegexIterator as $key1 => $value1) { if ($rRegexIterator->hasChildren()) { // print all children echo "Children: "; foreach ($rRegexIterator->getChildren() as $key => $value) { var_dump($value); } echo "\n"; } else { echo "No children\n"; var_dump($rRegexIterator->current()); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 38
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 38
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 31
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 28
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 28
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/q0TdL
function name:  (null)
number of ops:  40
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%5E%28t%29e%28s%29t%2F'
    4     7        SEND_VAL_EX                                              2
          8        SEND_VAL_EX                                              0
          9        SEND_VAL_EX                                              1
         10        DO_FCALL                                      0          
    3    11        ASSIGN                                                   !1, $9
    6    12      > FE_RESET_R                                       $12     !1, ->38
         13    > > FE_FETCH_R                                       ~13     $12, !2, ->38
         14    >   ASSIGN                                                   !3, ~13
    8    15        INIT_METHOD_CALL                                         !1, 'hasChildren'
         16        DO_FCALL                                      0  $15     
         17      > JMPZ                                                     $15, ->31
   11    18    >   ECHO                                                     'Children%3A+'
   12    19        INIT_METHOD_CALL                                         !1, 'getChildren'
         20        DO_FCALL                                      0  $16     
         21      > FE_RESET_R                                       $17     $16, ->28
         22    > > FE_FETCH_R                                       ~18     $17, !4, ->28
         23    >   ASSIGN                                                   !5, ~18
   13    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                                 
   12    27      > JMP                                                      ->22
         28    >   FE_FREE                                                  $17
   15    29        ECHO                                                     '%0A'
         30      > JMP                                                      ->37
   17    31    >   ECHO                                                     'No+children%0A'
   18    32        INIT_FCALL                                               'var_dump'
         33        INIT_METHOD_CALL                                         !1, 'current'
         34        DO_FCALL                                      0  $21     
         35        SEND_VAR                                                 $21
         36        DO_ICALL                                                 
    6    37    > > JMP                                                      ->13
         38    >   FE_FREE                                                  $12
   20    39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.6 ms | 1405 KiB | 15 Q