3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait SomeTrait { public $b = true; } class Food { use SomeTrait; public $i = 0; } class AnimalFood extends Food {} interface Animal { public function eat(AnimalFood $food); } class Dog implements Animal { public function eat(Food $food) {} } var_dump(new AnimalFood);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RsDcu
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'food'
   12     1        DECLARE_CLASS                                            'animalfood', 'food'
   18     2        DECLARE_CLASS                                            'dog'
   24     3        INIT_FCALL                                               'var_dump'
          4        NEW                                              $0      'AnimalFood'
          5        DO_FCALL                                      0          
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class SomeTrait: [no user functions]
Class Food: [no user functions]
Class AnimalFood: [no user functions]
Class Animal:
Function eat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RsDcu
function name:  eat
number of ops:  2
compiled vars:  !0 = $food
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function eat

End of class Animal.

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

End of function eat

End of class Dog.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.5 ms | 1395 KiB | 15 Q