3v4l.org

run code in 300+ PHP versions simultaneously
<?php function A() { try { b(); } catch(Exception $e) { echo "Exceptin caught in " . __CLASS__; } } function B() { C(); } try { A(); } catch(Exception $e) { echo "Error caught in global scope: " . $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 3
Branch analysis from position: 3
2 jumps found. (Code = 107) Position 1 = 4, Position 2 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XumH8
function name:  (null)
number of ops:  9
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'a'
          1        DO_FCALL                                      0          
          2      > JMP                                                      ->8
   17     3  E > > CATCH                                       last         'Exception'
   18     4    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          5        DO_FCALL                                      0  $2      
          6        CONCAT                                           ~3      'Error+caught+in+global+scope%3A+', $2
          7        ECHO                                                     ~3
   19     8    > > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 3
Branch analysis from position: 3
2 jumps found. (Code = 107) Position 1 = 4, Position 2 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XumH8
function name:  A
number of ops:  6
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'b'
          1        DO_FCALL                                      0          
          2      > JMP                                                      ->5
    5     3  E > > CATCH                                       last         'Exception'
    6     4    >   ECHO                                                     'Exceptin+caught+in+'
    8     5    > > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XumH8
function name:  B
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL_BY_NAME                                       'C'
          1        DO_FCALL                                      0          
   12     2      > RETURN                                                   null

End of function b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.51 ms | 1399 KiB | 14 Q