3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private function bar() { echo __METHOD__ . PHP_EOL; } public function callFooBar() { return $this->bar(); } } class Baz extends Foo { public function bar() { echo __METHOD__ . PHP_EOL; } public function callBar() { return $this->bar(); } } $a = new Baz(); $a->callFooBar(); $a->callBar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TImO8
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'Baz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'callFooBar'
          4        DO_FCALL                                      0          
   22     5        INIT_METHOD_CALL                                         !0, 'callBar'
          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/TImO8
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'Foo%3A%3Abar%0A'
    6     1      > RETURN                                                   null

End of function bar

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

End of function callfoobar

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/TImO8
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'Baz%3A%3Abar%0A'
   14     1      > RETURN                                                   null

End of function bar

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

End of function callbar

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

End of function callfoobar

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.91 ms | 1399 KiB | 13 Q