3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class Element { } class Super { public function test() { $this->getOptions(new Element); } protected function getOptions(Element $element) : array { return ["element", "Eelement"]; } } class Child extends Super { protected function getOptions(Element $element) : array { print "hei"; 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/E3Ph1
function name:  (null)
number of ops:  11
compiled vars:  !0 = $super, !1 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $2      'Test%5CSuper'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   29     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
   31     5        NEW                                              $6      'Test%5CChild'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   32     8        INIT_METHOD_CALL                                         !1, 'test'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Test\Element: [no user functions]
Class Test\Super:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E3Ph1
function name:  test
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_METHOD_CALL                                         'getOptions'
          1        NEW                                              $0      'Test%5CElement'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
   12     5      > 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/E3Ph1
function name:  getOptions
number of ops:  4
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1      > RETURN                                                   <array>
   16     2*       VERIFY_RETURN_TYPE                                       
          3*     > 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/E3Ph1
function name:  getOptions
number of ops:  5
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   23     1        ECHO                                                     'hei'
   24     2      > RETURN                                                   <array>
   25     3*       VERIFY_RETURN_TYPE                                       
          4*     > 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/E3Ph1
function name:  test
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_METHOD_CALL                                         'getOptions'
          1        NEW                                              $0      'Test%5CElement'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
   12     5      > RETURN                                                   null

End of function test

End of class Test\Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.22 ms | 1390 KiB | 13 Q