3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class Super { public function test() { $this->getOptions(); } protected function getOptions() : array { return ["element", "Eelement"]; } } class Child extends Super { protected function getOptions() : array { return ["ok", "Test"]; } } $super = new Super(); $super->test(); $child = new Child(); $child->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cu4tH
function name:  (null)
number of ops:  11
compiled vars:  !0 = $super, !1 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $2      'Test%5CSuper'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   24     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
   26     5        NEW                                              $6      'Test%5CChild'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   27     8        INIT_METHOD_CALL                                         !1, 'test'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Test\Super:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cu4tH
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_METHOD_CALL                                         'getOptions'
          1        DO_FCALL                                      0          
    8     2      > RETURN                                                   null

End of function test

Function getoptions:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cu4tH
function name:  getOptions
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   <array>
   12     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function getoptions

End of class Test\Super.

Class Test\Child:
Function getoptions:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cu4tH
function name:  getOptions
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E > > RETURN                                                   <array>
   20     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function getoptions

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

End of function test

End of class Test\Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.34 ms | 1386 KiB | 13 Q