3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace test\load { class testIn { public function testIt() { } } } namespace testCall\toHell { // use test\load\testIn; class wtf { public function __construct(testIn $variable) { echo 'OK!'; } } } namespace { $r = new ReflectionClass('\testCall\toHell\wtf'); $constructorArguments[] = new test\load\testIn(); $instance = $r->newInstanceArgs($constructorArguments); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gvotn
function name:  (null)
number of ops:  13
compiled vars:  !0 = $r, !1 = $constructorArguments, !2 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   NEW                                              $3      'ReflectionClass'
          1        SEND_VAL_EX                                              '%5CtestCall%5CtoHell%5Cwtf'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   36     4        NEW                                              $7      'test%5Cload%5CtestIn'
          5        DO_FCALL                                      0          
          6        ASSIGN_DIM                                               !1
          7        OP_DATA                                                  $7
   38     8        INIT_METHOD_CALL                                         !0, 'newInstanceArgs'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $9      
         11        ASSIGN                                                   !2, $9
   39    12      > RETURN                                                   1

Class test\load\testIn:
Function testit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gvotn
function name:  testIt
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   null

End of function testit

End of class test\load\testIn.

Class testCall\toHell\wtf:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gvotn
function name:  __construct
number of ops:  3
compiled vars:  !0 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   26     1        ECHO                                                     'OK%21'
   27     2      > RETURN                                                   null

End of function __construct

End of class testCall\toHell\wtf.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.7 ms | 1394 KiB | 13 Q