3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace NS1 { class c1 { public function __construct(\NS2\c1 $c1) { } } } namespace NS2 { class c1 { public function __construct() { } } } namespace Foo { error_reporting(E_ALL); ini_seT('display_errors', 'on'); $r = new \ReflectionClass('\NS1\c1'); echo $r->getName(); echo '<br />'; echo $r->getConstructor()->getParameters()[0]->getClass()->getName(); die; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/p0P2f
function name:  (null)
number of ops:  28
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cerror_reporting'
          1        FETCH_CONSTANT                                   ~1      'Foo%5CE_ALL'
          2        SEND_VAL_EX                                              ~1
          3        DO_FCALL                                      0          
   22     4        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cini_seT'
          5        SEND_VAL_EX                                              'display_errors'
          6        SEND_VAL_EX                                              'on'
          7        DO_FCALL                                      0          
   23     8        NEW                                              $4      'ReflectionClass'
          9        SEND_VAL_EX                                              '%5CNS1%5Cc1'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !0, $4
   25    12        INIT_METHOD_CALL                                         !0, 'getName'
         13        DO_FCALL                                      0  $7      
         14        ECHO                                                     $7
   26    15        ECHO                                                     '%3Cbr+%2F%3E'
   27    16        INIT_METHOD_CALL                                         !0, 'getConstructor'
         17        DO_FCALL                                      0  $8      
         18        INIT_METHOD_CALL                                         $8, 'getParameters'
         19        DO_FCALL                                      0  $9      
         20        FETCH_DIM_R                                      ~10     $9, 0
         21        INIT_METHOD_CALL                                         ~10, 'getClass'
         22        DO_FCALL                                      0  $11     
         23        INIT_METHOD_CALL                                         $11, 'getName'
         24        DO_FCALL                                      0  $12     
         25        ECHO                                                     $12
   30    26      > EXIT                                                     
   32    27*     > RETURN                                                   1

Class NS1\c1:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p0P2f
function name:  __construct
number of ops:  2
compiled vars:  !0 = $c1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   null

End of function __construct

End of class NS1\c1.

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

End of function __construct

End of class NS2\c1.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.05 ms | 1398 KiB | 16 Q