3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $a->test(); }catch(Throwable $ee){ echo "Catched exception: " . $ee->getMessage() . "\n"; } //Third case: let's trigger a slightly different error try { $stdObject = new StdClass(); array_diff([$stdObject], [$stdObject]); }catch(Throwable $ee){ //Handler is called, exception is thrown but... IT IS NOT CATCHED! echo "Catched exception: " . $ee->getMessage() . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
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 = 25
Branch analysis from position: 25
Found catch point at position: 19
Branch analysis from position: 19
2 jumps found. (Code = 107) Position 1 = 20, Position 2 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FpYrT
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $ee, !2 = $stdObject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_METHOD_CALL                                         !0, 'test'
          1        DO_FCALL                                      0          
          2      > JMP                                                      ->9
    5     3  E > > CATCH                                       last         'Throwable'
    6     4    >   INIT_METHOD_CALL                                         !1, 'getMessage'
          5        DO_FCALL                                      0  $4      
          6        CONCAT                                           ~5      'Catched+exception%3A+', $4
          7        CONCAT                                           ~6      ~5, '%0A'
          8        ECHO                                                     ~6
   11     9    >   NEW                                              $7      'StdClass'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $7
   12    12        INIT_FCALL                                               'array_diff'
         13        INIT_ARRAY                                       ~10     !2
         14        SEND_VAL                                                 ~10
         15        INIT_ARRAY                                       ~11     !2
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                                 
         18      > JMP                                                      ->25
   13    19  E > > CATCH                                       last         'Throwable'
   15    20    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         21        DO_FCALL                                      0  $13     
         22        CONCAT                                           ~14     'Catched+exception%3A+', $13
         23        CONCAT                                           ~15     ~14, '%0A'
         24        ECHO                                                     ~15
   16    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.01 ms | 1396 KiB | 15 Q