3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test () { try { $a = 1; return $a; } catch (\Exception $e) { $a = 2; return $a; } finally { $a = 3; return $a; } } var_dump(test());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/99TML
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'test'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) 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
2 jumps found. (Code = 162) Position 1 = 12, Position 2 = 9
Branch analysis from position: 12
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/99TML
function name:  test
number of ops:  17
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 1
    6     1        QM_ASSIGN                                        ~4      !0
          2      > FAST_CALL                                                ->12
          3    > > RETURN                                                   ~4
          4*       JMP                                                      ->10
    7     5  E > > CATCH                                       last         'Exception'
    8     6    >   ASSIGN                                                   !0, 2
    9     7        QM_ASSIGN                                        ~6      !0
          8      > FAST_CALL                                                ->12
          9    > > RETURN                                                   ~6
   10    10*       FAST_CALL                                                ->12
         11*       JMP                                                      ->16
   11    12    >   ASSIGN                                                   !0, 3
   12    13        DISCARD_EXCEPTION                                        
         14      > RETURN                                                   !0
         15*       FAST_RET                                                 
   14    16*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.24 ms | 1454 KiB | 15 Q