3v4l.org

run code in 300+ PHP versions simultaneously
<?php function belette($x = null) { try { if ($x === null) { throw new \Exception('exception'); } return $x; } catch (\Exception $e) { return 'exception'; } finally { return 'finally'; } } var_dump(belette('furet')); var_dump(belette());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ANMJC
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'belette'
          2        SEND_VAL                                                 'furet'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   17     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'belette'
          8        DO_FCALL                                      0  $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function belette:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 162) Position 1 = 16, Position 2 = 9
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 11
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
2 jumps found. (Code = 162) Position 1 = 16, Position 2 = 13
Branch analysis from position: 16
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ANMJC
function name:  belette
number of ops:  20
compiled vars:  !0 = $x, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
    5     1        TYPE_CHECK                                    2          !0
          2      > JMPZ                                                     ~3, ->7
    6     3    >   NEW                                              $4      'Exception'
          4        SEND_VAL_EX                                              'exception'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $4
    8     7    >   QM_ASSIGN                                        ~6      !0
          8      > FAST_CALL                                                ->16
          9    > > RETURN                                                   ~6
         10*       JMP                                                      ->14
    9    11  E > > CATCH                                       last         'Exception'
   10    12    > > FAST_CALL                                                ->16
         13    > > RETURN                                                   'exception'
   11    14*       FAST_CALL                                                ->16
         15*       JMP                                                      ->19
   12    16    >   DISCARD_EXCEPTION                                        
         17      > RETURN                                                   'finally'
         18*       FAST_RET                                                 
   14    19*     > RETURN                                                   null

End of function belette

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
191.63 ms | 1399 KiB | 17 Q