3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { public function returnSelf() : self { return $this; } } class A { use T; } (new A)->returnSelf();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWT3r
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'a'
   13     1        NEW                                              $0      'A'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'returnSelf'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function returnself

End of class T.

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.37 ms | 1397 KiB | 13 Q