3v4l.org

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

Class Test\Element: [no user functions]
Class Test\Hello: [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/eQqqZ
function name:  test
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_NS_FCALL_BY_NAME                                    'Test%5Cvar_dump'
          1        INIT_METHOD_CALL                                         'getOptions'
          2        NEW                                              $0      'Test%5CElement'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $0
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR_NO_REF_EX                                       $2
          7        DO_FCALL                                      0          
   16     8      > 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/eQqqZ
function name:  getOptions
number of ops:  5
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        VERIFY_RETURN_TYPE                               ~1      null
          2      > RETURN                                                   ~1
   20     3*       VERIFY_RETURN_TYPE                                       
          4*     > 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/eQqqZ
function name:  getOptions
number of ops:  4
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   27     1      > RETURN                                                   <array>
   28     2*       VERIFY_RETURN_TYPE                                       
          3*     > 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/eQqqZ
function name:  test
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_NS_FCALL_BY_NAME                                    'Test%5Cvar_dump'
          1        INIT_METHOD_CALL                                         'getOptions'
          2        NEW                                              $0      'Test%5CElement'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $0
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR_NO_REF_EX                                       $2
          7        DO_FCALL                                      0          
   16     8      > RETURN                                                   null

End of function test

End of class Test\Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.58 ms | 1400 KiB | 15 Q