3v4l.org

run code in 300+ PHP versions simultaneously
<?php function will_throw_exception() { throw new Exception('My very best exception'); } try { will_throw_exception(); } catch (Exception $e) { echo 'Caught exception: ' . $e->getMessage(); } finally { echo "Finally"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 162) Position 1 = 10, Position 2 = 9
Branch analysis from position: 10
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 3
Branch analysis from position: 3
2 jumps found. (Code = 107) Position 1 = 4, Position 2 = -2
Branch analysis from position: 4
2 jumps found. (Code = 162) Position 1 = 10, Position 2 = 9
Branch analysis from position: 10
Branch analysis from position: 9
filename:       /in/3u2Wa
function name:  (null)
number of ops:  13
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'will_throw_exception'
          1        DO_FCALL                                      0          
          2      > JMP                                                      ->8
   10     3  E > > CATCH                                       last         'Exception'
   11     4    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          5        DO_FCALL                                      0  $3      
          6        CONCAT                                           ~4      'Caught+exception%3A+', $3
          7        ECHO                                                     ~4
   12     8    > > FAST_CALL                                                ->10
          9    > > JMP                                                      ->12
   13    10    >   ECHO                                                     'Finally'
         11      > FAST_RET                                                 
   14    12    > > RETURN                                                   1

Function will_throw_exception:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/3u2Wa
function name:  will_throw_exception
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'My+very+best+exception'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    6     4*     > RETURN                                                   null

End of function will_throw_exception

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.12 ms | 1397 KiB | 14 Q