3v4l.org

run code in 500+ PHP versions simultaneously
<?php class SomeParent { public function test(): static { return $this; } } final class SomeChild extends SomeParent { } $obj = new SomeChild(); var_dump($obj->test());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B61Io
function name:  (null)
number of ops:  9
compiled vars:  !0 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   NEW                                                  $1      'SomeChild'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   16     3        INIT_FCALL                                                   'var_dump'
          4        INIT_METHOD_CALL                                             !0, 'test'
          5        DO_FCALL                                          0  $4      
          6        SEND_VAR                                                     $4
          7        DO_ICALL                                                     
          8      > RETURN                                                       1

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

End of function test

End of class SomeParent.

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

End of function test

End of class SomeChild.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.59 ms | 1474 KiB | 14 Q