3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { throw new \Exception('Hugo'); } catch (\Exception $e) { echo "Exception Caught! Nice\n"; } try { echo "Do nice things...\n"; } catch (\Exception $e) { echo "\nSHIT\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JE5W7
function name:  (null)
number of ops:  12
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'Exception'
          1        SEND_VAL_EX                                              'Hugo'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $1
          4*       JMP                                                      ->7
    4     5  E > > CATCH                                       last         'Exception'
    5     6    >   ECHO                                                     'Exception+Caught%21+Nice%0A'
    9     7        ECHO                                                     'Do+nice+things...%0A'
          8      > JMP                                                      ->11
   10     9  E > > CATCH                                       last         'Exception'
   11    10    >   ECHO                                                     '%0ASHIT%0A'
   12    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.14 ms | 1393 KiB | 13 Q