3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $z = false; $z->test(); } catch (Exception $e) { echo "Exception:\n"; var_dump($e->getMessage()); } catch (Error $e) { echo "Error:\n"; var_dump($e->getMessage()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
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 = 12
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
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
Found catch point at position: 12
Branch analysis from position: 12
filename:       /in/8Q86p
function name:  (null)
number of ops:  20
compiled vars:  !0 = $z, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <false>
    5     1        INIT_METHOD_CALL                                         !0, 'test'
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->19
    7     4  E > > CATCH                                                    'Exception', ->12
    9     5    >   ECHO                                                     'Exception%3A%0A'
   10     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !1, 'getMessage'
          8        DO_FCALL                                      0  $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
         11      > JMP                                                      ->19
   12    12  E > > CATCH                                       last         'Error'
   14    13    >   ECHO                                                     'Error%3A%0A'
   15    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !1, 'getMessage'
         16        DO_FCALL                                      0  $6      
         17        SEND_VAR                                                 $6
         18        DO_ICALL                                                 
   16    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.28 ms | 1395 KiB | 15 Q