3v4l.org

run code in 300+ PHP versions simultaneously
<?php $instance = new class {}; $class_name = "class@anonymous".chr(0).__FILE__; class_alias($class_name, 'MyAlias'); $d = get_declared_classes(); end($d); var_dump(current($d)); var_dump(new $class_name); var_dump(new MyAlias);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6sZrf
function name:  (null)
number of ops:  33
compiled vars:  !0 = $instance, !1 = $class_name, !2 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $4      $3
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    5     4        ASSIGN                                                   !1, 'class%40anonymous%00%2Fin%2F6sZrf'
    6     5        INIT_FCALL                                               'class_alias'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 'MyAlias'
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'get_declared_classes'
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
    9    12        INIT_FCALL                                               'end'
         13        SEND_REF                                                 !2
         14        DO_ICALL                                                 
   10    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'current'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $12     
         19        SEND_VAR                                                 $12
         20        DO_ICALL                                                 
   11    21        INIT_FCALL                                               'var_dump'
         22        FETCH_CLASS                                   0  $14     !1
         23        NEW                                              $15     $14
         24        DO_FCALL                                      0          
         25        SEND_VAR                                                 $15
         26        DO_ICALL                                                 
   12    27        INIT_FCALL                                               'var_dump'
         28        NEW                                              $18     'MyAlias'
         29        DO_FCALL                                      0          
         30        SEND_VAR                                                 $18
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.91 ms | 1396 KiB | 23 Q