3v4l.org

run code in 300+ PHP versions simultaneously
<?php $anon2 = new class {}; var_dump($anon2); debug_zval_dump($anon2); $reflection = new ReflectionClass($anon2); var_dump($reflection->getName()); var_dump($reflection->isAnonymous()); echo PHP_EOL; $cls = get_class($anon2); var_dump($cls); $anon2 = null; var_dump(new $cls());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gKYJc
function name:  (null)
number of ops:  38
compiled vars:  !0 = $anon2, !1 = $reflection, !2 = $cls
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
    6     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'debug_zval_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    9    10        NEW                                              $9      'ReflectionClass'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !1, $9
   11    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !1, 'getName'
         16        DO_FCALL                                      0  $12     
         17        SEND_VAR                                                 $12
         18        DO_ICALL                                                 
   12    19        INIT_FCALL                                               'var_dump'
         20        INIT_METHOD_CALL                                         !1, 'isAnonymous'
         21        DO_FCALL                                      0  $14     
         22        SEND_VAR                                                 $14
         23        DO_ICALL                                                 
   15    24        ECHO                                                     '%0A'
   16    25        GET_CLASS                                        ~16     !0
         26        ASSIGN                                                   !2, ~16
   18    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
   20    30        ASSIGN                                                   !0, null
   21    31        INIT_FCALL                                               'var_dump'
         32        FETCH_CLASS                                   0  $20     !2
         33        NEW                                              $21     $20
         34        DO_FCALL                                      0          
         35        SEND_VAR                                                 $21
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.97 ms | 1396 KiB | 17 Q