3v4l.org

run code in 500+ PHP versions simultaneously
<?php class grandfather { function foo() { echo 'bar '.$this->x; } } class father extends grandfather { function foo() { echo 'foo'; parent::foo(); } } class son extends father { public $x = 'test'; function foo() { echo grandfather::foo(); } } (new son)->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RiiL4
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   29     0  E >   NEW                                                  $0      'son'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'foo'
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

Class grandfather:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RiiL4
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                          ~0      'x'
          1        CONCAT                                               ~1      'bar+', ~0
          2        ECHO                                                         ~1
    8     3      > RETURN                                                       null

End of function foo

End of class grandfather.

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

End of function foo

End of class father.

Class son:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RiiL4
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   25     0  E >   INIT_STATIC_METHOD_CALL                                      'grandfather', 'foo'
          1        DO_FCALL                                          0  $0      
          2        ECHO                                                         $0
   26     3      > RETURN                                                       null

End of function foo

End of class son.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.33 ms | 3275 KiB | 13 Q