3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bla extends RecursiveFilterIterator { public function accept() { echo "Accept: "; var_dump(parent::current()); return true; } } $rArrayIterator = new RecursiveArrayIterator(array('test1', array('tet3', 'test4', 'test5'))); $bla = new Bla($rArrayIterator); foreach ($bla as $key1 => $value1) { if ($bla->hasChildren()) { foreach ($bla->getChildren() as $value) { var_dump($value); } } else { echo "no children\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 26
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 26
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 24
Branch analysis from position: 14
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 = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 22
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/9465L
function name:  (null)
number of ops:  28
compiled vars:  !0 = $rArrayIterator, !1 = $bla, !2 = $value1, !3 = $key1, !4 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $5      'RecursiveArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
   14     4        NEW                                              $8      'Bla'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
   16     8      > FE_RESET_R                                       $11     !1, ->26
          9    > > FE_FETCH_R                                       ~12     $11, !2, ->26
         10    >   ASSIGN                                                   !3, ~12
   17    11        INIT_METHOD_CALL                                         !1, 'hasChildren'
         12        DO_FCALL                                      0  $14     
         13      > JMPZ                                                     $14, ->24
   18    14    >   INIT_METHOD_CALL                                         !1, 'getChildren'
         15        DO_FCALL                                      0  $15     
         16      > FE_RESET_R                                       $16     $15, ->22
         17    > > FE_FETCH_R                                               $16, !4, ->22
   19    18    >   INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                                 
   18    21      > JMP                                                      ->17
         22    >   FE_FREE                                                  $16
         23      > JMP                                                      ->25
   22    24    >   ECHO                                                     'no+children%0A'
   16    25    > > JMP                                                      ->9
         26    >   FE_FREE                                                  $11
   24    27      > RETURN                                                   1

Class Bla:
Function accept:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9465L
function name:  accept
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'Accept%3A+'
    8     1        INIT_FCALL                                               'var_dump'
          2        INIT_STATIC_METHOD_CALL                                  'current'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    9     6      > RETURN                                                   <true>
   10     7*     > RETURN                                                   null

End of function accept

End of class Bla.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.99 ms | 1400 KiB | 15 Q