3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { @$value = 1 / 0; } catch (DivisionByZeroError $e) { echo $e->getMessage(), "\n"; } var_dump($value); try { @$value = intdiv(1,0); } catch (DivisionByZeroError $e) { echo $e->getMessage(), "\n"; } var_dump($value); var_dump(intdiv(6,0));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
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 = 42) Position 1 = 26
Branch analysis from position: 26
Found catch point at position: 21
Branch analysis from position: 21
2 jumps found. (Code = 107) Position 1 = 22, Position 2 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XUKJb
function name:  (null)
number of ops:  37
compiled vars:  !0 = $value, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BEGIN_SILENCE                                    ~2      
          1        DIV                                              ~3      1, 0
          2        ASSIGN                                                   !0, ~3
          3        END_SILENCE                                              ~2
          4      > JMP                                                      ->10
    5     5  E > > CATCH                                       last         'DivisionByZeroError'
    6     6    >   INIT_METHOD_CALL                                         !1, 'getMessage'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9        ECHO                                                     '%0A'
    8    10    >   INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   11    13        BEGIN_SILENCE                                    ~7      
         14        INIT_FCALL                                               'intdiv'
         15        SEND_VAL                                                 1
         16        SEND_VAL                                                 0
         17        DO_ICALL                                         $8      
         18        ASSIGN                                                   !0, $8
         19        END_SILENCE                                              ~7
         20      > JMP                                                      ->26
   12    21  E > > CATCH                                       last         'DivisionByZeroError'
   13    22    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         23        DO_FCALL                                      0  $10     
         24        ECHO                                                     $10
         25        ECHO                                                     '%0A'
   15    26    >   INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                                 
   17    29        INIT_FCALL                                               'var_dump'
         30        INIT_FCALL                                               'intdiv'
         31        SEND_VAL                                                 6
         32        SEND_VAL                                                 0
         33        DO_ICALL                                         $12     
         34        SEND_VAR                                                 $12
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.62 ms | 1396 KiB | 17 Q