3v4l.org

run code in 500+ PHP versions simultaneously
<?php spl_autoload_register(function() { eval('class Foo {'); // syntax error }); spl_autoload_register(function() { throw new Exception(); }); try { new Widget(); } catch (Throwable $t) { for ($i = 1; $t; $t = $t->getPrevious()) { printf("#%d %s: %s in %s:%d\n", $i++, get_class($t), $t->getMessage(), $t->getFile(), $t->getLine()); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 15
Branch analysis from position: 35
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 15
Branch analysis from position: 35
Branch analysis from position: 15
filename:       /in/DXGtj
function name:  (null)
number of ops:  36
compiled vars:  !0 = $t, !1 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
    5     2        SEND_VAL                                                     ~2
    3     3        DO_ICALL                                                     
    6     4        INIT_FCALL                                                   'spl_autoload_register'
          5        DECLARE_LAMBDA_FUNCTION                              ~4      [1]
    8     6        SEND_VAL                                                     ~4
    6     7        DO_ICALL                                                     
   11     8        NEW                                                  $6      'Widget'
          9        DO_FCALL                                          0          
         10        FREE                                                         $6
         11      > JMP                                                          ->35
   12    12  E > > CATCH                                           last         'Throwable'
   13    13    >   ASSIGN                                                       !1, 1
         14      > JMP                                                          ->34
   14    15    >   INIT_FCALL                                                   'printf'
         16        SEND_VAL                                                     '%23%25d+%25s%3A+%25s+in+%25s%3A%25d%0A'
         17        POST_INC                                             ~9      !1
         18        SEND_VAL                                                     ~9
         19        GET_CLASS                                            ~10     !0
         20        SEND_VAL                                                     ~10
         21        INIT_METHOD_CALL                                             !0, 'getMessage'
         22        DO_FCALL                                          0  $11     
         23        SEND_VAR                                                     $11
         24        INIT_METHOD_CALL                                             !0, 'getFile'
         25        DO_FCALL                                          0  $12     
         26        SEND_VAR                                                     $12
         27        INIT_METHOD_CALL                                             !0, 'getLine'
         28        DO_FCALL                                          0  $13     
         29        SEND_VAR                                                     $13
         30        DO_ICALL                                                     
   13    31        INIT_METHOD_CALL                                             !0, 'getPrevious'
         32        DO_FCALL                                          0  $15     
         33        ASSIGN                                                       !0, $15
         34    > > JMPNZ                                                        !0, ->15
   16    35    > > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DXGtj
function name:  {closure:/in/DXGtj:3}
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INCLUDE_OR_EVAL                                              'class+Foo+%7B', EVAL
    5     1      > RETURN                                                       null

End of Dynamic Function 0

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

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.63 ms | 2274 KiB | 15 Q