3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DebugRII extends RecursiveIteratorIterator { public function beginChildren() { echo __METHOD__, "\n"; } public function beginIteration() { echo __METHOD__, "\n"; } public function callGetChildren() { echo __METHOD__, "\n"; } public function callHasChildren() { echo __METHOD__, "\n"; } public function endChildren() { echo __METHOD__, "\n"; } public function endIteration() { echo __METHOD__, "\n"; } } class DebugRAI extends RecursiveArrayIterator { public function rewind() { echo __METHOD__, "\n"; return parent::rewind(); } public function current() { echo __METHOD__, "\n"; return parent::current(); } public function key() { echo __METHOD__, "\n"; return parent::key(); } public function valid() { echo __METHOD__, "\n"; return parent::valid(); } public function next() { echo __METHOD__, "\n"; return parent::next(); } } $array = array("A","B","C"); $iterator = new RecursiveArrayIterator(new RecursiveArrayIterator($array)); while ($iterator->valid()) { echo $iterator->current(), "\n"; $iterator->next(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
Branch analysis from position: 9
filename:       /in/P0Ggp
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array, !1 = $iterator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, <array>
   20     1        NEW                                              $3      'RecursiveArrayIterator'
          2        NEW                                              $4      'RecursiveArrayIterator'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $4
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $3
   21     8      > JMP                                                      ->15
   22     9    >   INIT_METHOD_CALL                                         !1, 'current'
         10        DO_FCALL                                      0  $8      
         11        ECHO                                                     $8
         12        ECHO                                                     '%0A'
   23    13        INIT_METHOD_CALL                                         !1, 'next'
         14        DO_FCALL                                      0          
   21    15    >   INIT_METHOD_CALL                                         !1, 'valid'
         16        DO_FCALL                                      0  $10     
         17      > JMPNZ                                                    $10, ->9
   24    18    > > RETURN                                                   1

Class DebugRII:
Function beginchildren:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  beginChildren
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'DebugRII%3A%3AbeginChildren'
          1        ECHO                                                     '%0A'
          2      > RETURN                                                   null

End of function beginchildren

Function beginiteration:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  beginIteration
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'DebugRII%3A%3AbeginIteration'
          1        ECHO                                                     '%0A'
          2      > RETURN                                                   null

End of function beginiteration

Function callgetchildren:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  callGetChildren
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'DebugRII%3A%3AcallGetChildren'
          1        ECHO                                                     '%0A'
          2      > RETURN                                                   null

End of function callgetchildren

Function callhaschildren:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  callHasChildren
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'DebugRII%3A%3AcallHasChildren'
          1        ECHO                                                     '%0A'
          2      > RETURN                                                   null

End of function callhaschildren

Function endchildren:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  endChildren
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'DebugRII%3A%3AendChildren'
          1        ECHO                                                     '%0A'
          2      > RETURN                                                   null

End of function endchildren

Function enditeration:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  endIteration
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'DebugRII%3A%3AendIteration'
          1        ECHO                                                     '%0A'
          2      > RETURN                                                   null

End of function enditeration

End of class DebugRII.

Class DebugRAI:
Function rewind:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  rewind
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'DebugRAI%3A%3Arewind'
          1        ECHO                                                     '%0A'
          2        INIT_STATIC_METHOD_CALL                                  'rewind'
          3        DO_FCALL                                      0  $0      
          4      > RETURN                                                   $0
          5*     > RETURN                                                   null

End of function rewind

Function current:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  current
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'DebugRAI%3A%3Acurrent'
          1        ECHO                                                     '%0A'
          2        INIT_STATIC_METHOD_CALL                                  'current'
          3        DO_FCALL                                      0  $0      
          4      > RETURN                                                   $0
          5*     > RETURN                                                   null

End of function current

Function key:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  key
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'DebugRAI%3A%3Akey'
          1        ECHO                                                     '%0A'
          2        INIT_STATIC_METHOD_CALL                                  'key'
          3        DO_FCALL                                      0  $0      
          4      > RETURN                                                   $0
          5*     > RETURN                                                   null

End of function key

Function valid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  valid
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'DebugRAI%3A%3Avalid'
          1        ECHO                                                     '%0A'
          2        INIT_STATIC_METHOD_CALL                                  'valid'
          3        DO_FCALL                                      0  $0      
          4      > RETURN                                                   $0
          5*     > RETURN                                                   null

End of function valid

Function next:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P0Ggp
function name:  next
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     'DebugRAI%3A%3Anext'
          1        ECHO                                                     '%0A'
          2        INIT_STATIC_METHOD_CALL                                  'next'
          3        DO_FCALL                                      0  $0      
          4      > RETURN                                                   $0
          5*     > RETURN                                                   null

End of function next

End of class DebugRAI.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.28 ms | 1407 KiB | 13 Q