3v4l.org

run code in 300+ PHP versions simultaneously
<?php $classes = get_declared_classes(); foreach ( $classes as $clazz ) { $r = new ReflectionClass( $clazz ); if ( !$r->isInstantiable() ) { continue; } try { new $clazz(); } catch ( ArgumentCountError|TypeError $e ) { // Nothing } catch ( Throwable $e ) { echo $clazz . ": "; echo get_class( $e ) . ': ' . $e->getMessage() . "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 34
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 34
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
Found catch point at position: 19
Branch analysis from position: 19
2 jumps found. (Code = 107) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 21
2 jumps found. (Code = 107) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
Branch analysis from position: 23
2 jumps found. (Code = 107) Position 1 = 24, Position 2 = -2
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Found catch point at position: 21
Branch analysis from position: 21
Found catch point at position: 23
Branch analysis from position: 23
filename:       /in/BmAkH
function name:  (null)
number of ops:  36
compiled vars:  !0 = $classes, !1 = $clazz, !2 = $r, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'get_declared_classes'
          1        DO_ICALL                                         $4      
          2        ASSIGN                                                   !0, $4
    5     3      > FE_RESET_R                                       $6      !0, ->34
          4    > > FE_FETCH_R                                               $6, !1, ->34
    6     5    >   NEW                                              $7      'ReflectionClass'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $7
    7     9        INIT_METHOD_CALL                                         !2, 'isInstantiable'
         10        DO_FCALL                                      0  $10     
         11        BOOL_NOT                                         ~11     $10
         12      > JMPZ                                                     ~11, ->14
    8    13    > > JMP                                                      ->4
   11    14    >   FETCH_CLASS                                   0  $12     !1
         15        NEW                                              $13     $12
         16        DO_FCALL                                      0          
         17        FREE                                                     $13
         18      > JMP                                                      ->33
   12    19  E > > CATCH                                                    'ArgumentCountError', ->21
         20    > > JMP                                                      ->22
         21  E > > CATCH                                                    'TypeError', ->23
         22    > > JMP                                                      ->33
   14    23  E > > CATCH                                       last         'Throwable'
   15    24    >   CONCAT                                           ~15     !1, '%3A+'
         25        ECHO                                                     ~15
   16    26        GET_CLASS                                        ~16     !3
         27        CONCAT                                           ~17     ~16, '%3A+'
         28        INIT_METHOD_CALL                                         !3, 'getMessage'
         29        DO_FCALL                                      0  $18     
         30        CONCAT                                           ~19     ~17, $18
         31        CONCAT                                           ~20     ~19, '%0A'
         32        ECHO                                                     ~20
    5    33    > > JMP                                                      ->4
         34    >   FE_FREE                                                  $6
   18    35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.05 ms | 1007 KiB | 14 Q