3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace V1 { interface Foo { public function merge(Foo $foo); } } namespace V2 { interface Foo extends \V1\Foo { } } namespace { use V2\Foo; // use V1\Foo; class FooImpl implements Foo { public function merge(Foo $foo) { // ... } } $fooImpl1 = new FooImpl; $fooImpl2 = new FooImpl; $fooImpl1->merge($fooImpl2); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I2gkY
function name:  (null)
number of ops:  12
compiled vars:  !0 = $fooImpl1, !1 = $fooImpl2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'v2%5Cfoo'
   20     1        DECLARE_CLASS                                            'fooimpl'
   28     2        NEW                                              $2      'FooImpl'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   29     5        NEW                                              $5      'FooImpl'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   31     8        INIT_METHOD_CALL                                         !0, 'merge'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0          
   32    11      > RETURN                                                   1

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

End of function merge

End of class V1\Foo.

Class V2\Foo: [no user functions]
Class FooImpl:
Function merge:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I2gkY
function name:  merge
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   25     1      > RETURN                                                   null

End of function merge

End of class FooImpl.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.83 ms | 1398 KiB | 13 Q