3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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
Jump found. (Code = 62) Position 1 = -2
filename:       /in/1upNP
function name:  (null)
number of ops:  8
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   4     1        NOP                                                      
         2        NOP                                                      
   6     3        NOP                                                      
  10     4        DECLARE_CLASS                                    $4      'usergateway_mysql'
         5        ADD_INTERFACE                                            $4, 'UserGateway'
         6        VERIFY_ABSTRACT_CLASS                                    $4
  15     7      > RETURN                                                   1

Class User: [no user functions]
Class Baby: [no user functions]
Class UserGateway:
Function find:
Finding entry points
Branch analysis from position: 0
Jump 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
Jump 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      :-5
         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 7.2.0