3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooIterator extends ArrayIterator{ function __construct(){ throw new Exception; } } class Foo implements IteratorAggregate{ function getIterator(){ return new FooIterator(); } } function baz(){ $x = new Foo; foreach($x as $y => $z); } function bar(){ baz(); } function rofl(){ bar(); } rofl();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2GNSv
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'foo'
   26     1        INIT_FCALL                                               'rofl'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function baz:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/2GNSv
function name:  baz
number of ops:  9
compiled vars:  !0 = $x, !1 = $z, !2 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   15     3      > FE_RESET_R                                       $6      !0, ->7
          4    > > FE_FETCH_R                                       ~7      $6, !1, ->7
          5    >   ASSIGN                                                   !2, ~7
          6      > JMP                                                      ->4
          7    >   FE_FREE                                                  $6
   16     8      > RETURN                                                   null

End of function baz

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2GNSv
function name:  bar
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'baz'
          1        DO_FCALL                                      0          
   20     2      > RETURN                                                   null

End of function bar

Function rofl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2GNSv
function name:  rofl
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_FCALL                                               'bar'
          1        DO_FCALL                                      0          
   24     2      > RETURN                                                   null

End of function rofl

Class FooIterator:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/2GNSv
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $0      'Exception'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $0
          3*     > RETURN                                                   null

End of function __construct

End of class FooIterator.

Class Foo:
Function getiterator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2GNSv
function name:  getIterator
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $0      'FooIterator'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   10     3*     > RETURN                                                   null

End of function getiterator

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.99 ms | 948 KiB | 17 Q