3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DoctrineType { public function implemented(): mixed { return 'bla'; } } class EnumType extends DoctrineType { public function implemented(): \stdClass { return new \stdClass(); } } $bar = new EnumType(); var_dump($bar->implemented());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DLWKM
function name:  (null)
number of ops:  9
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'EnumType'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'implemented'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class DoctrineType:
Function implemented:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DLWKM
function name:  implemented
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'bla'
    7     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function implemented

End of class DoctrineType.

Class EnumType:
Function implemented:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DLWKM
function name:  implemented
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $0      'stdClass'
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
   14     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function implemented

End of class EnumType.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.06 ms | 1010 KiB | 14 Q