3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = new class {}; $ref = new ReflectionClass($foo); var_dump($ref->getFilename()); $foo = eval('new class {}'); $ref = new ReflectionClass($foo); var_dump($ref->getFilename());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fQupB
function name:  (null)
number of ops:  25
compiled vars:  !0 = $foo, !1 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <true>  
          1        NEW                                              $3      $2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    5     4        NEW                                              $6      'ReflectionClass'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    6     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !1, 'getFilename'
         10        DO_FCALL                                      0  $9      
         11        SEND_VAR                                                 $9
         12        DO_ICALL                                                 
    8    13        INCLUDE_OR_EVAL                                  $11     'new+class+%7B%7D', EVAL
         14        ASSIGN                                                   !0, $11
    9    15        NEW                                              $13     'ReflectionClass'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !1, $13
   10    19        INIT_FCALL                                               'var_dump'
         20        INIT_METHOD_CALL                                         !1, 'getFilename'
         21        DO_FCALL                                      0  $16     
         22        SEND_VAR                                                 $16
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.59 ms | 1395 KiB | 15 Q