3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Entity {} interface IFoobarable {} trait Foobarable {} class TestEntity extends Entity implements IFoobarable { use Foobarable; } function test(Entity&IFoobarable $obj) { echo "PHP is awesome!"; } $obj = new TestEntity(); test($obj);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PblG3
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'testentity', 'entity'
   13     1        NEW                                              $1      'TestEntity'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   14     4        INIT_FCALL                                               'test'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PblG3
function name:  test
number of ops:  3
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ECHO                                                     'PHP+is+awesome%21'
   11     2      > RETURN                                                   null

End of function test

Class Entity: [no user functions]
Class IFoobarable: [no user functions]
Class Foobarable: [no user functions]
Class TestEntity: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.32 ms | 997 KiB | 14 Q