3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private function bar() { echo __METHOD__, "\n"; } public function bang() { self::bar(); $this->bar(); } } class Baz extends Foo { public function bar() { echo __METHOD__, "\n"; } } $foo = new Baz; $foo->bar(); $foo->bang();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9k8Qd
function name:  (null)
number of ops:  8
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Baz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
   20     5        INIT_METHOD_CALL                                         !0, 'bang'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function bar

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

End of function bang

End of class Foo.

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

End of function bar

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

End of function bang

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.17 ms | 1399 KiB | 13 Q