3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Concrete\Test { use DerpFoo; class Test { public function __construct(DerpFoo $foo) {} } $f = new Test(new \Concrete\BetterFoo\BetterFoo); } namespace Concrete\Foo { class Foo {} class_alias('\Concrete\Foo\Foo', 'DerpFoo'); } namespace Concrete\BetterFoo { use \Concrete\Foo\Foo; use DerpFoo; class BetterFoo extends DerpFoo {} }
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/ROanJ
function name:  (null)
number of ops:  15
compiled vars:  !0 = $f
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   NOP                                                      
   9     1        NEW                                              $2      :-6
         2        NEW                                              $3      :-4
         3        DO_FCALL                                      0          
         4        SEND_VAR_NO_REF                               0          $3
         5        DO_FCALL                                      0          
         6        ASSIGN                                                   !0, $2
  13     7        NOP                                                      
  14     8        INIT_NS_FCALL_BY_NAME                                    
         9        SEND_VAL_EX                                              '%5CConcrete%5CFoo%5CFoo'
        10        SEND_VAL_EX                                              'DerpFoo'
        11        DO_FCALL                                      0          
  20    12        FETCH_CLASS                                   0  :9      'DerpFoo'
        13        DECLARE_INHERITED_CLASS                                  '%00concrete%5Cbetterfoo%5Cbetterfoo%2Fin%2FROanJ0x7fdc45e8717a', 'concrete%5Cbetterfoo%5Cbetterfoo'
        14      > RETURN                                                   1

Class Concrete\Test\Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/ROanJ
function name:  __construct
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 __construct

End of class Concrete\Test\Test.

Class Concrete\Foo\Foo: [no user functions]
Class Concrete\BetterFoo\BetterFoo: [no user functions]

Generated using Vulcan Logic Dumper, using php 7.2.0