3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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()); //
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sULkI
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   DECLARE_CLASS                                            'bulldogfeeder'
   17     1        INIT_FCALL                                               'feedchihuahua'
          2        NEW                                              $0      'BulldogFeeder'
          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/sULkI
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      'Chihuahua'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $1
          5        DO_FCALL                                      0          
   10     6      > RETURN                                                   null

End of function feedchihuahua

Class DogFeeder:
Function feed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sULkI
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/sULkI
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 8.0.0


preferences:
192.16 ms | 1390 KiB | 14 Q