3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($errno, $errstr) { global $errored; $errored = TRUE; return TRUE; }); $errored = FALSE; var_dump( array_filter( get_declared_classes(), function ($className) use (&$errored) { $errored = FALSE; if (!(new ReflectionClass($className))->hasMethod('__toString') && $className !== "Closure" && substr($className, 7) !== "SQLite3") { try { $x = new $className; $x = (string)$x; return $errored; } catch (Exception $e) { return FALSE; } } return FALSE; } ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6TvGd
function name:  (null)
number of ops:  17
compiled vars:  !0 = $errored
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F6TvGd%3A4%240'
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    6     4        ASSIGN                                                   !0, <false>
    8     5        INIT_FCALL                                               'var_dump'
    9     6        INIT_FCALL                                               'array_filter'
   10     7        INIT_FCALL                                               'get_declared_classes'
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
   11    10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F6TvGd%3A11%241'
         11        BIND_LEXICAL                                             ~5, !0
   23    12        SEND_VAL                                                 ~5
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
   25    16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F6TvGd%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6TvGd
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errored
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_GLOBAL                                              !2, 'errored'
          3        ASSIGN                                                   !2, <true>
          4      > RETURN                                                   <true>
          5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F6TvGd%3A4%240

Function %00%7Bclosure%7D%2Fin%2F6TvGd%3A11%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 31
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 13
Found catch point at position: 29
Branch analysis from position: 29
2 jumps found. (Code = 107) Position 1 = 30, Position 2 = -2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6TvGd
function name:  {closure}
number of ops:  33
compiled vars:  !0 = $className, !1 = $errored, !2 = $x, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   12     2        ASSIGN                                                   !1, <false>
   13     3        NEW                                              $5      'ReflectionClass'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        INIT_METHOD_CALL                                         $5, 'hasMethod'
          7        SEND_VAL_EX                                              '__toString'
          8        DO_FCALL                                      0  $7      
          9        BOOL_NOT                                         ~8      $7
         10      > JMPZ_EX                                          ~8      ~8, ->13
         11    >   IS_NOT_IDENTICAL                                 ~9      !0, 'Closure'
         12        BOOL                                             ~8      ~9
         13    > > JMPZ_EX                                          ~8      ~8, ->20
         14    >   INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 7
         17        DO_ICALL                                         $10     
         18        IS_NOT_IDENTICAL                                 ~11     $10, 'SQLite3'
         19        BOOL                                             ~8      ~11
         20    > > JMPZ                                                     ~8, ->31
   15    21    >   FETCH_CLASS                                   0  $12     !0
         22        NEW                                              $13     $12
         23        DO_FCALL                                      0          
         24        ASSIGN                                                   !2, $13
   16    25        CAST                                          6  ~16     !2
         26        ASSIGN                                                   !2, ~16
   17    27      > RETURN                                                   !1
         28*       JMP                                                      ->31
   18    29  E > > CATCH                                       last         'Exception'
   19    30    > > RETURN                                                   <false>
   22    31    > > RETURN                                                   <false>
   23    32*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F6TvGd%3A11%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.75 ms | 1400 KiB | 23 Q