3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { new NotAClass; } catch (Throwable $e) { echo 'Caught exception: ', $e->getMessage(), PHP_EOL; } try { class Foo extends NotAClass {} } catch (Throwable $e) { echo 'Caught exception: ', $e->getMessage(), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BDnm9
function name:  (null)
number of ops:  19
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $1      'NotAClass'
          1        DO_FCALL                                      0          
          2        FREE                                                     $1
          3      > JMP                                                      ->10
    5     4  E > > CATCH                                       last         'Throwable'
    6     5    >   ECHO                                                     'Caught+exception%3A+'
          6        INIT_METHOD_CALL                                         !0, 'getMessage'
          7        DO_FCALL                                      0  $3      
          8        ECHO                                                     $3
          9        ECHO                                                     '%0A'
   10    10    >   DECLARE_CLASS                                            'foo', 'notaclass'
         11      > JMP                                                      ->18
   11    12  E > > CATCH                                       last         'Throwable'
   12    13    >   ECHO                                                     'Caught+exception%3A+'
         14        INIT_METHOD_CALL                                         !0, 'getMessage'
         15        DO_FCALL                                      0  $4      
         16        ECHO                                                     $4
         17        ECHO                                                     '%0A'
   13    18    > > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.24 ms | 1007 KiB | 13 Q