3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function baz() { echo 'yes'; } public function fizz() { static::bar(); } public function buzz() { $this->baz(); } } class Bar Extends Foo { public function baz() { echo 'no'; } } $f = new Bar(); $f->fizz(); $f->buzz();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O8IXN
function name:  (null)
number of ops:  8
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   30     3        INIT_METHOD_CALL                                         !0, 'fizz'
          4        DO_FCALL                                      0          
   31     5        INIT_METHOD_CALL                                         !0, 'buzz'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function baz

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

End of function fizz

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

End of function buzz

End of class Foo.

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

End of function baz

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

End of function fizz

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

End of function buzz

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.27 ms | 1403 KiB | 13 Q