3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { (function() { return throw new Exception("first"); })(); } catch (Throwable $e) { var_dump($e); } try { (function() { throw new Exception("second"); })(); } catch (Throwable $e) { var_dump($e); } try { (function() { return throw throw throw new Exception("second"); })(); } catch (Throwable $e) { var_dump($e); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
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 = 16
Branch analysis from position: 16
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 = 42) Position 1 = 24
Branch analysis from position: 24
Found catch point at position: 20
Branch analysis from position: 20
2 jumps found. (Code = 107) Position 1 = 21, Position 2 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RqqZK
function name:  (null)
number of ops:  25
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          1        INIT_DYNAMIC_CALL                                        ~1
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->8
          4  E > > CATCH                                       last         'Throwable'
          5    >   INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    5     8    >   DECLARE_LAMBDA_FUNCTION                          ~4      [1]
          9        INIT_DYNAMIC_CALL                                        ~4
         10        DO_FCALL                                      0          
         11      > JMP                                                      ->16
         12  E > > CATCH                                       last         'Throwable'
         13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
    7    16    >   DECLARE_LAMBDA_FUNCTION                          ~7      [2]
         17        INIT_DYNAMIC_CALL                                        ~7
         18        DO_FCALL                                      0          
         19      > JMP                                                      ->24
         20  E > > CATCH                                       last         'Throwable'
         21    >   INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
         24    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/RqqZK
function name:  {closure}
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'first'
          2        DO_FCALL                                      0          
          3      > THROW                                         1          $0
          4*       RETURN                                                   <true>
          5*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/RqqZK
function name:  {closure}
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                                              'second'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
          4*     > RETURN                                                   null

End of Dynamic Function 1

Dynamic Function 2
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/RqqZK
function name:  {closure}
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'second'
          2        DO_FCALL                                      0          
          3      > THROW                                         1          $0
          4*       THROW                                         1          <true>
          5*       THROW                                         1          <true>
          6*       RETURN                                                   <true>
          7*     > RETURN                                                   null

End of Dynamic Function 2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.18 ms | 1007 KiB | 14 Q