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 { 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 = 22
Branch analysis from position: 22
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: 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 = 62) Position 1 = -2
filename:       /in/fuALn
function name:  (null)
number of ops:  23
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    >   INIT_FCALL                                               'array_diff'
         10        INIT_ARRAY                                       ~7      !2
         11        SEND_VAL                                                 ~7
         12        INIT_ARRAY                                       ~8      !2
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
         15      > JMP                                                      ->22
   12    16  E > > CATCH                                       last         'Throwable'
   14    17    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         18        DO_FCALL                                      0  $10     
         19        CONCAT                                           ~11     'Catched+exception%3A+', $10
         20        CONCAT                                           ~12     ~11, '%0A'
         21        ECHO                                                     ~12
   15    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.39 ms | 1395 KiB | 15 Q