3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Concrete\BetterFoo { use \Concrete\Foo\FooInterface; use \Concrete\Foo\Foo; class BetterFoo extends Foo implements FooInterface {} } namespace Concrete\Test { use DerpFoo; class Test { public function __construct(Concrete\Foo\FooInterface $foo) {} } $f = new Test(new \Concrete\BetterFoo\BetterFoo); } namespace Concrete\Foo { class Foo implements FooInterface { public function Derp() {} } interface FooInterface { public function Derp(); } class_alias('\Concrete\Foo\Foo', 'DerpFoo'); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s6Ieg
function name:  (null)
number of ops:  13
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'concrete%5Cbetterfoo%5Cbetterfoo', 'concrete%5Cfoo%5Cfoo'
   15     1        NEW                                              $1      'Concrete%5CTest%5CTest'
          2        NEW                                              $2      'Concrete%5CBetterFoo%5CBetterFoo'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $2
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
   19     7        DECLARE_CLASS                                            'concrete%5Cfoo%5Cfoo'
   26     8        INIT_NS_FCALL_BY_NAME                                    'Concrete%5CFoo%5Cclass_alias'
          9        SEND_VAL_EX                                              '%5CConcrete%5CFoo%5CFoo'
         10        SEND_VAL_EX                                              'DerpFoo'
         11        DO_FCALL                                      0          
   27    12      > RETURN                                                   1

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

End of function __construct

End of class Concrete\Test\Test.

Class Concrete\Foo\Foo:
Function derp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s6Ieg
function name:  Derp
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E > > RETURN                                                   null

End of function derp

End of class Concrete\Foo\Foo.

Class Concrete\Foo\FooInterface:
Function derp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s6Ieg
function name:  Derp
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E > > RETURN                                                   null

End of function derp

End of class Concrete\Foo\FooInterface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.15 ms | 1388 KiB | 15 Q