3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public function m() {} } class y extends x { public function m():?string { return "1"; } } $x = new x(); $y = new y(); $x->m(); $y->m();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gJCCa
function name:  (null)
number of ops:  11
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'x'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   14     3        NEW                                              $5      'y'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   15     6        INIT_METHOD_CALL                                         !0, 'm'
          7        DO_FCALL                                      0          
   16     8        INIT_METHOD_CALL                                         !1, 'm'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

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

End of function m

End of class x.

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

End of function m

End of class y.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.66 ms | 1393 KiB | 13 Q