3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array(); foreach(get_declared_classes() as $class) { $ref = new ReflectionClass($class); $name = $ref->getFileName(); if(!isset($values[$name])) { $values[$name] = array($class); } else { $values[$name] = $class; } } var_dump($values);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/Tn0pM
function name:  (null)
number of ops:  27
compiled vars:  !0 = $values, !1 = $class, !2 = $ref, !3 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'get_declared_classes'
          2        DO_ICALL                                         $5      
          3      > FE_RESET_R                                       $6      $5, ->22
          4    > > FE_FETCH_R                                               $6, !1, ->22
    6     5    >   NEW                                              $7      'ReflectionClass'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $7
    7     9        INIT_METHOD_CALL                                         !2, 'getFileName'
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !3, $10
    9    12        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     !0, !3
         13        BOOL_NOT                                         ~13     ~12
         14      > JMPZ                                                     ~13, ->19
   10    15    >   INIT_ARRAY                                       ~15     !1
         16        ASSIGN_DIM                                               !0, !3
         17        OP_DATA                                                  ~15
         18      > JMP                                                      ->21
   12    19    >   ASSIGN_DIM                                               !0, !3
         20        OP_DATA                                                  !1
    5    21    > > JMP                                                      ->4
         22    >   FE_FREE                                                  $6
   16    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.36 ms | 1396 KiB | 17 Q