3v4l.org

run code in 300+ PHP versions simultaneously
<?php function aaa($x) { try { if ($x === 0) { throw new Exception('zero!'); } } catch (Exception $e) { echo "Caught inside : " . $e->getMessage() . "\n"; } return $x; } try { aaa(5); aaa(0); } catch (Exception $e) { echo "Caught : " . $e->getMessage() . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jaANC
function name:  (null)
number of ops:  14
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'aaa'
          1        SEND_VAL                                                 5
          2        DO_FCALL                                      0          
   16     3        INIT_FCALL                                               'aaa'
          4        SEND_VAL                                                 0
          5        DO_FCALL                                      0          
          6      > JMP                                                      ->13
   17     7  E > > CATCH                                       last         'Exception'
   18     8    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          9        DO_FCALL                                      0  $3      
         10        CONCAT                                           ~4      'Caught+%3A+', $3
         11        CONCAT                                           ~5      ~4, '%0A'
         12        ECHO                                                     ~5
   19    13    > > RETURN                                                   1

Function aaa:
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
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jaANC
function name:  aaa
number of ops:  16
compiled vars:  !0 = $x, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        IS_IDENTICAL                                             !0, 0
          2      > JMPZ                                                     ~2, ->7
    6     3    >   NEW                                              $3      'Exception'
          4        SEND_VAL_EX                                              'zero%21'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $3
          7    > > JMP                                                      ->14
    8     8  E > > CATCH                                       last         'Exception'
    9     9    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         10        DO_FCALL                                      0  $5      
         11        CONCAT                                           ~6      'Caught+inside+%3A+', $5
         12        CONCAT                                           ~7      ~6, '%0A'
         13        ECHO                                                     ~7
   11    14    > > RETURN                                                   !0
   12    15*     > RETURN                                                   null

End of function aaa

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.99 ms | 1398 KiB | 15 Q