3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register(function($class) { throw new Exception("Could not load $class"); }); spl_autoload_register(function($class) { if ($class == "Widget") { eval('class Widget { }'); } }); spl_autoload_register(function($class) { throw new Exception("Still could not load $class"); }); try { new Foo(); } catch (Exception $e) { for ($i = 1; $e; $e = $e->getPrevious()) printf("#%d Foo: %s\n", $i++, $e->getMessage()); } finally { var_dump(class_exists("Foo", false)); } try { new Widget(); } catch (Exception $e) { for ($i = 1; $e; $e = $e->getPrevious()) printf("#%d Foo: %s\n", $i++, $e->getMessage()); } finally { var_dump(class_exists("Widget", false)); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 162) Position 1 = 33, Position 2 = 32
Branch analysis from position: 33
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 60
Branch analysis from position: 60
2 jumps found. (Code = 162) Position 1 = 62, Position 2 = 61
Branch analysis from position: 62
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 61
1 jumps found. (Code = 42) Position 1 = 70
Branch analysis from position: 70
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 16
Branch analysis from position: 16
2 jumps found. (Code = 107) Position 1 = 17, Position 2 = -2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 19
Branch analysis from position: 31
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 19
Branch analysis from position: 31
Branch analysis from position: 19
Found catch point at position: 45
Branch analysis from position: 45
2 jumps found. (Code = 107) Position 1 = 46, Position 2 = -2
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 48
Branch analysis from position: 60
Branch analysis from position: 48
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 48
Branch analysis from position: 60
Branch analysis from position: 48
filename:       /in/IlUiA
function name:  (null)
number of ops:  71
compiled vars:  !0 = $e, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIlUiA%3A3%240'
    5     2        SEND_VAL                                                 ~2
          3        DO_ICALL                                                 
    6     4        INIT_FCALL                                               'spl_autoload_register'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIlUiA%3A6%241'
   10     6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   11     8        INIT_FCALL                                               'spl_autoload_register'
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIlUiA%3A11%242'
   13    10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
   16    12        NEW                                              $9      'Foo'
         13        DO_FCALL                                      0          
         14        FREE                                                     $9
         15      > JMP                                                      ->31
   17    16  E > > CATCH                                       last         'Exception'
   18    17    >   ASSIGN                                                   !1, 1
         18      > JMP                                                      ->30
         19    >   INIT_FCALL                                               'printf'
         20        SEND_VAL                                                 '%23%25d+Foo%3A+%25s%0A'
         21        POST_INC                                         ~12     !1
         22        SEND_VAL                                                 ~12
         23        INIT_METHOD_CALL                                         !0, 'getMessage'
         24        DO_FCALL                                      0  $13     
         25        SEND_VAR                                                 $13
         26        DO_ICALL                                                 
         27        INIT_METHOD_CALL                                         !0, 'getPrevious'
         28        DO_FCALL                                      0  $15     
         29        ASSIGN                                                   !0, $15
         30    > > JMPNZ                                                    !0, ->19
   19    31    > > FAST_CALL                                                ->33
         32    > > JMP                                                      ->41
   20    33    >   INIT_FCALL                                               'var_dump'
         34        INIT_FCALL                                               'class_exists'
         35        SEND_VAL                                                 'Foo'
         36        SEND_VAL                                                 <false>
         37        DO_ICALL                                         $17     
         38        SEND_VAR                                                 $17
         39        DO_ICALL                                                 
         40      > FAST_RET                                                 
   24    41    >   NEW                                              $20     'Widget'
         42        DO_FCALL                                      0          
         43        FREE                                                     $20
         44      > JMP                                                      ->60
   25    45  E > > CATCH                                       last         'Exception'
   26    46    >   ASSIGN                                                   !1, 1
         47      > JMP                                                      ->59
         48    >   INIT_FCALL                                               'printf'
         49        SEND_VAL                                                 '%23%25d+Foo%3A+%25s%0A'
         50        POST_INC                                         ~23     !1
         51        SEND_VAL                                                 ~23
         52        INIT_METHOD_CALL                                         !0, 'getMessage'
         53        DO_FCALL                                      0  $24     
         54        SEND_VAR                                                 $24
         55        DO_ICALL                                                 
         56        INIT_METHOD_CALL                                         !0, 'getPrevious'
         57        DO_FCALL                                      0  $26     
         58        ASSIGN                                                   !0, $26
         59    > > JMPNZ                                                    !0, ->48
   27    60    > > FAST_CALL                                                ->62
         61    > > JMP                                                      ->70
   28    62    >   INIT_FCALL                                               'var_dump'
         63        INIT_FCALL                                               'class_exists'
         64        SEND_VAL                                                 'Widget'
         65        SEND_VAL                                                 <false>
         66        DO_ICALL                                         $28     
         67        SEND_VAR                                                 $28
         68        DO_ICALL                                                 
         69      > FAST_RET                                                 
   29    70    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FIlUiA%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/IlUiA
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        NEW                                              $1      'Exception'
          2        NOP                                                      
          3        FAST_CONCAT                                      ~2      'Could+not+load+', !0
          4        SEND_VAL_EX                                              ~2
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $1
    5     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIlUiA%3A3%240

Function %00%7Bclosure%7D%2Fin%2FIlUiA%3A6%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/IlUiA
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        IS_EQUAL                                                 !0, 'Widget'
          2      > JMPZ                                                     ~1, ->4
    8     3    >   INCLUDE_OR_EVAL                                          'class+Widget+%7B+%7D', EVAL
   10     4    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIlUiA%3A6%241

Function %00%7Bclosure%7D%2Fin%2FIlUiA%3A11%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/IlUiA
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        NEW                                              $1      'Exception'
          2        NOP                                                      
          3        FAST_CONCAT                                      ~2      'Still+could+not+load+', !0
          4        SEND_VAL_EX                                              ~2
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $1
   13     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIlUiA%3A11%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.61 ms | 1404 KiB | 21 Q