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]); }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 = 24
Branch analysis from position: 24
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 = 24
Branch analysis from position: 24
Found catch point at position: 18
Branch analysis from position: 18
2 jumps found. (Code = 107) Position 1 = 19, Position 2 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kicjl
function name:  (null)
number of ops:  25
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        SEND_VAL                                                 <array>
         14        INIT_ARRAY                                       ~10     !2
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                                 
         17      > JMP                                                      ->24
   13    18  E > > CATCH                                       last         'Throwable'
   15    19    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         20        DO_FCALL                                      0  $12     
         21        CONCAT                                           ~13     'Catched+exception%3A+', $12
         22        CONCAT                                           ~14     ~13, '%0A'
         23        ECHO                                                     ~14
   16    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.27 ms | 1400 KiB | 15 Q