3v4l.org

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

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.07 ms | 1396 KiB | 23 Q