3v4l.org

run code in 300+ PHP versions simultaneously
<?php class F {function x(){}} class G {function x():int{ return 42; }} var_dump((new G)->x());;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RbWKU
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'var_dump'
          1        NEW                                              $0      'G'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'x'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

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

End of function x

End of class F.

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

End of function x

End of class G.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.27 ms | 1405 KiB | 15 Q