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 />'; $p = $r->getConstructor()->getParameters(); echo $p[0]->getClass()->getName(); die; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/oKQ0a
function name:  (null)
number of ops:  29
compiled vars:  !0 = $r, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cerror_reporting'
          1        FETCH_CONSTANT                                   ~2      'Foo%5CE_ALL'
          2        SEND_VAL_EX                                              ~2
          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                                              $5      'ReflectionClass'
          9        SEND_VAL_EX                                              '%5CNS1%5Cc1'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !0, $5
   25    12        INIT_METHOD_CALL                                         !0, 'getName'
         13        DO_FCALL                                      0  $8      
         14        ECHO                                                     $8
   26    15        ECHO                                                     '%3Cbr+%2F%3E'
   27    16        INIT_METHOD_CALL                                         !0, 'getConstructor'
         17        DO_FCALL                                      0  $9      
         18        INIT_METHOD_CALL                                         $9, 'getParameters'
         19        DO_FCALL                                      0  $10     
         20        ASSIGN                                                   !1, $10
   29    21        FETCH_DIM_R                                      ~12     !1, 0
         22        INIT_METHOD_CALL                                         ~12, 'getClass'
         23        DO_FCALL                                      0  $13     
         24        INIT_METHOD_CALL                                         $13, 'getName'
         25        DO_FCALL                                      0  $14     
         26        ECHO                                                     $14
   33    27      > EXIT                                                     
   35    28*     > 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/oKQ0a
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/oKQ0a
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:
152.07 ms | 1399 KiB | 16 Q