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" && $className !== "SQLITE3Stmt") { 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/J1tfm
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%2FJ1tfm%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%2FJ1tfm%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%2FJ1tfm%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J1tfm
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%2FJ1tfm%3A4%240

Function %00%7Bclosure%7D%2Fin%2FJ1tfm%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 = 16
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 27
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 13
Found catch point at position: 25
Branch analysis from position: 25
2 jumps found. (Code = 107) Position 1 = 26, Position 2 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J1tfm
function name:  {closure}
number of ops:  29
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, ->16
         14    >   IS_NOT_IDENTICAL                                 ~10     !0, 'SQLITE3Stmt'
         15        BOOL                                             ~8      ~10
         16    > > JMPZ                                                     ~8, ->27
   15    17    >   FETCH_CLASS                                   0  $11     !0
         18        NEW                                              $12     $11
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !2, $12
   16    21        CAST                                          6  ~15     !2
         22        ASSIGN                                                   !2, ~15
   17    23      > RETURN                                                   !1
         24*       JMP                                                      ->27
   18    25  E > > CATCH                                       last         'Exception'
   19    26    > > RETURN                                                   <false>
   22    27    > > RETURN                                                   <false>
   23    28*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.53 ms | 1400 KiB | 21 Q