3v4l.org

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

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.61 ms | 1398 KiB | 16 Q