3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User {} class Baby extends User {} interface UserGateway { function find($id): User; } class UserGateway_MySql implements UserGateway { // must return User or subtype of User function find($id) { return new User(); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1upNP
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'usergateway_mysql'
   15     1      > RETURN                                                   1

Class User: [no user functions]
Class Baby: [no user functions]
Class UserGateway:
Function find:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1upNP
function name:  find
number of ops:  3
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        VERIFY_RETURN_TYPE                                       
          2      > RETURN                                                   null

End of function find

End of class UserGateway.

Class UserGateway_MySql:
Function find:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1upNP
function name:  find
number of ops:  5
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        NEW                                              $1      'User'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   $1
   14     4*     > RETURN                                                   null

End of function find

End of class UserGateway_MySql.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.06 ms | 1394 KiB | 13 Q