3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { 10 / 0; } catch (\DivisionByZeroError $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { $null->var = false; } catch (\Error $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { $i = 100; $i[] = 'd'; } catch (\Error $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { [''][new stdClass]; } catch (\TypeError $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { $s = 'abc'; $s[''] = 'd'; } catch (\TypeError $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { echo UNDEF_CONST; } catch (\TypeError $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); }
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 = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
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: 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 = 42) Position 1 = 22
Branch analysis from position: 22
Found catch point at position: 14
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Found catch point at position: 26
Branch analysis from position: 26
2 jumps found. (Code = 107) Position 1 = 27, Position 2 = -2
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
Found catch point at position: 39
Branch analysis from position: 39
2 jumps found. (Code = 107) Position 1 = 40, Position 2 = -2
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
Found catch point at position: 51
Branch analysis from position: 51
2 jumps found. (Code = 107) Position 1 = 52, Position 2 = -2
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 70
Branch analysis from position: 70
Found catch point at position: 62
Branch analysis from position: 62
2 jumps found. (Code = 107) Position 1 = 63, Position 2 = -2
Branch analysis from position: 63
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/li8a2
function name:  (null)
number of ops:  71
compiled vars:  !0 = $e, !1 = $null, !2 = $i, !3 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DIV                                              ~4      10, 0
          1        FREE                                                     ~4
          2      > JMP                                                      ->11
          3  E > > CATCH                                       last         'DivisionByZeroError'
          4    >   INIT_FCALL                                               'printf'
          5        SEND_VAL                                                 '%25d%3A+%25s%0A'
          6        SEND_VAL                                                 2
          7        INIT_METHOD_CALL                                         !0, 'getMessage'
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
    3    11    >   ASSIGN_OBJ                                               !1, 'var'
         12        OP_DATA                                                  <false>
         13      > JMP                                                      ->22
         14  E > > CATCH                                       last         'Error'
         15    >   INIT_FCALL                                               'printf'
         16        SEND_VAL                                                 '%25d%3A+%25s%0A'
         17        SEND_VAL                                                 3
         18        INIT_METHOD_CALL                                         !0, 'getMessage'
         19        DO_FCALL                                      0  $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                                 
    4    22    >   ASSIGN                                                   !2, 100
         23        ASSIGN_DIM                                               !2
         24        OP_DATA                                                  'd'
         25      > JMP                                                      ->34
         26  E > > CATCH                                       last         'Error'
         27    >   INIT_FCALL                                               'printf'
         28        SEND_VAL                                                 '%25d%3A+%25s%0A'
         29        SEND_VAL                                                 4
         30        INIT_METHOD_CALL                                         !0, 'getMessage'
         31        DO_FCALL                                      0  $12     
         32        SEND_VAR                                                 $12
         33        DO_ICALL                                                 
    5    34    >   NEW                                              $14     'stdClass'
         35        DO_FCALL                                      0          
         36        FETCH_DIM_R                                      ~16     <array>, $14
         37        FREE                                                     ~16
         38      > JMP                                                      ->47
         39  E > > CATCH                                       last         'TypeError'
         40    >   INIT_FCALL                                               'printf'
         41        SEND_VAL                                                 '%25d%3A+%25s%0A'
         42        SEND_VAL                                                 5
         43        INIT_METHOD_CALL                                         !0, 'getMessage'
         44        DO_FCALL                                      0  $17     
         45        SEND_VAR                                                 $17
         46        DO_ICALL                                                 
    6    47    >   ASSIGN                                                   !3, 'abc'
         48        ASSIGN_DIM                                               !3, ''
         49        OP_DATA                                                  'd'
         50      > JMP                                                      ->59
         51  E > > CATCH                                       last         'TypeError'
         52    >   INIT_FCALL                                               'printf'
         53        SEND_VAL                                                 '%25d%3A+%25s%0A'
         54        SEND_VAL                                                 6
         55        INIT_METHOD_CALL                                         !0, 'getMessage'
         56        DO_FCALL                                      0  $21     
         57        SEND_VAR                                                 $21
         58        DO_ICALL                                                 
    7    59    >   FETCH_CONSTANT                                   ~23     'UNDEF_CONST'
         60        ECHO                                                     ~23
         61      > JMP                                                      ->70
         62  E > > CATCH                                       last         'TypeError'
         63    >   INIT_FCALL                                               'printf'
         64        SEND_VAL                                                 '%25d%3A+%25s%0A'
         65        SEND_VAL                                                 7
         66        INIT_METHOD_CALL                                         !0, 'getMessage'
         67        DO_FCALL                                      0  $24     
         68        SEND_VAR                                                 $24
         69        DO_ICALL                                                 
         70    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.71 ms | 1408 KiB | 15 Q