3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A { class C {} var_dump(new C); } namespace { // Circumvent some checks so we can keep this in one file... eval('namespace B; class C {}'); } namespace B { var_dump(new C); use A\C; var_dump(new C); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q8Fq9
function name:  (null)
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_NS_FCALL_BY_NAME                                    'A%5Cvar_dump'
          1        NEW                                              $0      'A%5CC'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
   10     5        INCLUDE_OR_EVAL                                          'namespace+B%3B+class+C+%7B%7D', EVAL
   14     6        INIT_NS_FCALL_BY_NAME                                    'B%5Cvar_dump'
          7        NEW                                              $4      'B%5CC'
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $4
         10        DO_FCALL                                      0          
   16    11        INIT_NS_FCALL_BY_NAME                                    'B%5Cvar_dump'
         12        NEW                                              $7      'A%5CC'
         13        DO_FCALL                                      0          
         14        SEND_VAR_NO_REF_EX                                       $7
         15        DO_FCALL                                      0          
   17    16      > RETURN                                                   1

Class A\C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.99 ms | 1394 KiB | 15 Q