3v4l.org

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

Class derp\Foo: [no user functions]
Class herp\BetterFoo: [no user functions]
Class herp\Derp:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KC2tD
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 herp\Derp.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.66 ms | 1395 KiB | 15 Q