3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $test = function() { throw new Exception('exc'); }; $test(); } catch (Throwable $e) { var_dump($e->getTrace()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g3Stta
function name:  (null)
number of ops:  12
compiled vars:  !0 = $test, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          1        ASSIGN                                                   !0, ~2
    7     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0          
          4      > JMP                                                      ->11
    8     5  E > > CATCH                                       last         'Throwable'
    9     6    >   INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !1, 'getTrace'
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
   10    11    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/g3Stta
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'exc'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    6     4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.26 ms | 1013 KiB | 14 Q