3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo implements iterator { public function current() { } public function next() { } public function key() { } public function valid() { } public function rewind() { } } $foo = new foo(); foreach($foo as &$ref) {}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 126) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/rGdpT
function name:  (null)
number of ops:  9
compiled vars:  !0 = $foo, !1 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'foo'
   15     1        NEW                                              $2      'foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   16     4      > FE_RESET_RW                                      $5      !0, ->7
          5    > > FE_FETCH_RW                                              $5, !1, ->7
          6    > > JMP                                                      ->5
          7    >   FE_FREE                                                  $5
          8      > RETURN                                                   1

Class foo:
Function current:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rGdpT
function name:  current
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of function current

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

End of function next

Function key:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rGdpT
function name:  key
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > 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/rGdpT
function name:  valid
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   null

End of function valid

Function rewind:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rGdpT
function name:  rewind
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   null

End of function rewind

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.52 ms | 1395 KiB | 13 Q