3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.93 ms | 1396 KiB | 15 Q