3v4l.org

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

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

End of function __construct

End of class Concrete\BetterTest\Test.

Generated using Vulcan Logic Dumper, using php 7.2.0