3v4l.org

run code in 200+ PHP versions simultaneously
<?php class Dog {} interface DogFeeder { function feed(Dog $dog); } function feedChihuahua(DogFeeder $feeder) { $feeder->feed(new Chihuahua()); // this code is OK } class BulldogFeeder implements DogFeeder { function feed(Bulldog $dog) { } } feedChihuahua(new BulldogFeeder()); //
based on sULkI
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WjOFg
function name:  (null)
number of ops:  7
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  12     0  E >   ADD_INTERFACE                                            'bulldogfeeder'
  17     1        INIT_FCALL                                               'feedchihuahua'
         2        NEW                                              $0      :8
         3        DO_FCALL                                      0          
         4        SEND_VAR                                                 $0
         5        DO_FCALL                                      0          
         6      > RETURN                                                   1

Function feedchihuahua:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WjOFg
function name:  feedChihuahua
number of ops:  7
compiled vars:  !0 = $feeder
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E >   RECV                                             !0      
   9     1        INIT_METHOD_CALL                                         !0, 'feed'
         2        NEW                                              $1      :7
         3        DO_FCALL                                      0          
         4        SEND_VAR_NO_REF_EX                                       $1
         5        DO_FCALL                                      0          
  10     6      > RETURN                                                   null

End of function feedchihuahua

Class Dog: [no user functions]
Class DogFeeder:
Function feed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WjOFg
function name:  feed
number of ops:  2
compiled vars:  !0 = $dog
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   RECV                                             !0      
         1      > RETURN                                                   null

End of function feed

End of class DogFeeder.

Class BulldogFeeder:
Function feed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WjOFg
function name:  feed
number of ops:  2
compiled vars:  !0 = $dog
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  14     0  E >   RECV                                             !0      
         1      > RETURN                                                   null

End of function feed

End of class BulldogFeeder.

Generated using Vulcan Logic Dumper, using php 7.4.0