3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { public function add() : self { /** code **/ return "adad"; } } class myExtendedClass extends myClass { public function add() : parent { return "adad"; } } $instance = new myExtendedClass(); $instance->add();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sCCpP
function name:  (null)
number of ops:  6
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'myExtendedClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'add'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class myClass:
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sCCpP
function name:  add
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   VERIFY_RETURN_TYPE                               ~0      'adad'
          1      > RETURN                                                   ~0
    9     2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function add

End of class myClass.

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

End of function add

End of class myExtendedClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.39 ms | 1393 KiB | 13 Q