3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { } class FooCollection implements \Countable, \Iterator { private $fooArray = []; public function addFoo(Foo $foo) { $this->fooArray[] = $foo; } public function addEachFoo(array $fooArray) { foreach ($fooArray as $foo) { $this->addFoo($foo); } } public function count() { ; } public function current() { ; } public function key() { ; } public function next() { ; } public function rewind() { ; } public function valid() { ; } } $fooCollection = new FooCollection(); $fooCollection->addEachFoo([new Foo, new Foo, new Foo]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mnpV4
function name:  (null)
number of ops:  17
compiled vars:  !0 = $fooCollection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'foocollection'
   59     1        NEW                                              $1      'FooCollection'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   60     4        INIT_METHOD_CALL                                         !0, 'addEachFoo'
          5        NEW                                              $4      'Foo'
          6        DO_FCALL                                      0          
          7        INIT_ARRAY                                       ~6      $4
          8        NEW                                              $7      'Foo'
          9        DO_FCALL                                      0          
         10        ADD_ARRAY_ELEMENT                                ~6      $7
         11        NEW                                              $9      'Foo'
         12        DO_FCALL                                      0          
         13        ADD_ARRAY_ELEMENT                                ~6      $9
         14        SEND_VAL_EX                                              ~6
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

Class Foo: [no user functions]
Class FooCollection:
Function addfoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mnpV4
function name:  addFoo
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        FETCH_OBJ_W                                      $1      'fooArray'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   17     4      > RETURN                                                   null

End of function addfoo

Function addeachfoo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/mnpV4
function name:  addEachFoo
number of ops:  9
compiled vars:  !0 = $fooArray, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   21     1      > FE_RESET_R                                       $2      !0, ->7
          2    > > FE_FETCH_R                                               $2, !1, ->7
   23     3    >   INIT_METHOD_CALL                                         'addFoo'
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
   21     6      > JMP                                                      ->2
          7    >   FE_FREE                                                  $2
   25     8      > RETURN                                                   null

End of function addeachfoo

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

End of function count

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

End of function key

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

End of function next

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

End of function rewind

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

End of function valid

End of class FooCollection.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.56 ms | 1399 KiB | 13 Q