3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { }; class B { }; $var = 0; try { try { $var += 1; throw new B; $var += 2; } catch (B $b) { $var += 4; throw new A; } catch (A $a) { $var += 8; } finally { $var += 16; } } catch (Exception $e) { $var += 32; } echo $var;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 107) Position 1 = 14, Position 2 = -2
Branch analysis from position: 14
2 jumps found. (Code = 162) Position 1 = 17, Position 2 = 16
Branch analysis from position: 17
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 13
Branch analysis from position: 13
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/KcGZG
function name:  (null)
number of ops:  24
compiled vars:  !0 = $var, !1 = $b, !2 = $a, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 0
    9     1        ASSIGN_OP                                     1          !0, 1
   10     2        NEW                                              $7      'B'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $7
   11     5*       ASSIGN_OP                                     1          !0, 2
          6*       JMP                                                      ->15
   12     7  E > > CATCH                                                    'B', ->13
   13     8    >   ASSIGN_OP                                     1          !0, 4
   14     9        NEW                                              $11     'A'
         10        DO_FCALL                                      0          
         11      > THROW                                         0          $11
         12*       JMP                                                      ->15
   15    13  E > > CATCH                                       last         'A'
   16    14    >   ASSIGN_OP                                     1          !0, 8
   17    15      > FAST_CALL                                                ->17
         16    > > JMP                                                      ->19
   18    17    >   ASSIGN_OP                                     1          !0, 16
         18      > FAST_RET                                                 
         19    > > JMP                                                      ->22
   20    20  E > > CATCH                                       last         'Exception'
   21    21    >   ASSIGN_OP                                     1          !0, 32
   23    22    >   ECHO                                                     !0
         23      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.76 ms | 1395 KiB | 13 Q