3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar { class a { } class b { } function a() { return 'function a'; } function b() { return 'function b'; } const a = 'const a'; const b = 'const b'; } namespace { use Foo\Bar\a; use Foo\Bar\b; use function Foo\Bar\a; use function Foo\Bar\b; use const Foo\Bar\a; use const Foo\Bar\b; var_dump(new a()); var_dump(new b()); var_dump(a()); var_dump(b()); var_dump(a); var_dump(b); } namespace { use Foo\Bar\a, Foo\Bar\b; use function Foo\Bar\a, Foo\Bar\b; use const Foo\Bar\a, Foo\Bar\b; var_dump(new a()); var_dump(new b()); var_dump(a()); var_dump(b()); var_dump(a); var_dump(b); } namespace { use Foo\Bar\{a, b}; use function Foo\Bar\{a, b}; use const Foo\Bar\{a, b}; var_dump(new a()); var_dump(new b()); var_dump(a()); var_dump(b()); var_dump(a); var_dump(b); } namespace { use Foo\Bar\{a, b, function a, function b, const a, const b,}; var_dump(new a()); var_dump(new b()); var_dump(a()); var_dump(b()); var_dump(a); var_dump(b); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kkkUF
function name:  (null)
number of ops:  115
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CONST                                            'Foo%5CBar%5Ca', 'const+a'
    9     1        DECLARE_CONST                                            'Foo%5CBar%5Cb', 'const+b'
   20     2        INIT_FCALL                                               'var_dump'
          3        NEW                                              $0      'Foo%5CBar%5Ca'
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
   21     7        INIT_FCALL                                               'var_dump'
          8        NEW                                              $3      'Foo%5CBar%5Cb'
          9        DO_FCALL                                      0          
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                                 
   22    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'foo%5Cbar%5Ca'
         14        DO_FCALL                                      0  $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                                 
   23    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'foo%5Cbar%5Cb'
         19        DO_FCALL                                      0  $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                                 
   24    22        INIT_FCALL                                               'var_dump'
         23        FETCH_CONSTANT                                   ~10     'Foo%5CBar%5Ca'
         24        SEND_VAL                                                 ~10
         25        DO_ICALL                                                 
   25    26        INIT_FCALL                                               'var_dump'
         27        FETCH_CONSTANT                                   ~12     'Foo%5CBar%5Cb'
         28        SEND_VAL                                                 ~12
         29        DO_ICALL                                                 
   33    30        INIT_FCALL                                               'var_dump'
         31        NEW                                              $14     'Foo%5CBar%5Ca'
         32        DO_FCALL                                      0          
         33        SEND_VAR                                                 $14
         34        DO_ICALL                                                 
   34    35        INIT_FCALL                                               'var_dump'
         36        NEW                                              $17     'Foo%5CBar%5Cb'
         37        DO_FCALL                                      0          
         38        SEND_VAR                                                 $17
         39        DO_ICALL                                                 
   35    40        INIT_FCALL                                               'var_dump'
         41        INIT_FCALL                                               'foo%5Cbar%5Ca'
         42        DO_FCALL                                      0  $20     
         43        SEND_VAR                                                 $20
         44        DO_ICALL                                                 
   36    45        INIT_FCALL                                               'var_dump'
         46        INIT_FCALL                                               'foo%5Cbar%5Cb'
         47        DO_FCALL                                      0  $22     
         48        SEND_VAR                                                 $22
         49        DO_ICALL                                                 
   37    50        INIT_FCALL                                               'var_dump'
         51        FETCH_CONSTANT                                   ~24     'Foo%5CBar%5Ca'
         52        SEND_VAL                                                 ~24
         53        DO_ICALL                                                 
   38    54        INIT_FCALL                                               'var_dump'
         55        FETCH_CONSTANT                                   ~26     'Foo%5CBar%5Cb'
         56        SEND_VAL                                                 ~26
         57        DO_ICALL                                                 
   46    58        INIT_FCALL                                               'var_dump'
         59        NEW                                              $28     'Foo%5CBar%5Ca'
         60        DO_FCALL                                      0          
         61        SEND_VAR                                                 $28
         62        DO_ICALL                                                 
   47    63        INIT_FCALL                                               'var_dump'
         64        NEW                                              $31     'Foo%5CBar%5Cb'
         65        DO_FCALL                                      0          
         66        SEND_VAR                                                 $31
         67        DO_ICALL                                                 
   48    68        INIT_FCALL                                               'var_dump'
         69        INIT_FCALL                                               'foo%5Cbar%5Ca'
         70        DO_FCALL                                      0  $34     
         71        SEND_VAR                                                 $34
         72        DO_ICALL                                                 
   49    73        INIT_FCALL                                               'var_dump'
         74        INIT_FCALL                                               'foo%5Cbar%5Cb'
         75        DO_FCALL                                      0  $36     
         76        SEND_VAR                                                 $36
         77        DO_ICALL                                                 
   50    78        INIT_FCALL                                               'var_dump'
         79        FETCH_CONSTANT                                   ~38     'Foo%5CBar%5Ca'
         80        SEND_VAL                                                 ~38
         81        DO_ICALL                                                 
   51    82        INIT_FCALL                                               'var_dump'
         83        FETCH_CONSTANT                                   ~40     'Foo%5CBar%5Cb'
         84        SEND_VAL                                                 ~40
         85        DO_ICALL                                                 
   57    86        INIT_FCALL                                               'var_dump'
         87        NEW                                              $42     'Foo%5CBar%5Ca'
         88        DO_FCALL                                      0          
         89        SEND_VAR                                                 $42
         90        DO_ICALL                                                 
   58    91        INIT_FCALL                                               'var_dump'
         92        NEW                                              $45     'Foo%5CBar%5Cb'
         93        DO_FCALL                                      0          
         94        SEND_VAR                                                 $45
         95        DO_ICALL                                                 
   59    96        INIT_FCALL                                               'var_dump'
         97        INIT_FCALL                                               'foo%5Cbar%5Ca'
         98        DO_FCALL                                      0  $48     
         99        SEND_VAR                                                 $48
        100        DO_ICALL                                                 
   60   101        INIT_FCALL                                               'var_dump'
        102        INIT_FCALL                                               'foo%5Cbar%5Cb'
        103        DO_FCALL                                      0  $50     
        104        SEND_VAR                                                 $50
        105        DO_ICALL                                                 
   61   106        INIT_FCALL                                               'var_dump'
        107        FETCH_CONSTANT                                   ~52     'Foo%5CBar%5Ca'
        108        SEND_VAL                                                 ~52
        109        DO_ICALL                                                 
   62   110        INIT_FCALL                                               'var_dump'
        111        FETCH_CONSTANT                                   ~54     'Foo%5CBar%5Cb'
        112        SEND_VAL                                                 ~54
        113        DO_ICALL                                                 
   63   114      > RETURN                                                   1

Function foo%5Cbar%5Ca:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kkkUF
function name:  Foo\Bar\a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'function+a'
          1*     > RETURN                                                   null

End of function foo%5Cbar%5Ca

Function foo%5Cbar%5Cb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kkkUF
function name:  Foo\Bar\b
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'function+b'
          1*     > RETURN                                                   null

End of function foo%5Cbar%5Cb

Class Foo\Bar\a: [no user functions]
Class Foo\Bar\b: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.08 ms | 1407 KiB | 23 Q