3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(callable $d){} try { try { foo('notAnExistingFunction'); } catch(TypeError $te) { throw new Exception('Foo', 0, $te); } } catch (Exception $e) { echo $e->getMessage() . PHP_EOL; echo 'Now the Error:' . PHP_EOL; echo $e->getPrevious()->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MR3SS
function name:  (null)
number of ops:  24
compiled vars:  !0 = $te, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 'notAnExistingFunction'
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->11
    8     4  E > > CATCH                                       last         'TypeError'
    9     5    >   NEW                                              $3      'Exception'
          6        SEND_VAL_EX                                              'Foo'
          7        SEND_VAL_EX                                              0
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $3
         11    > > JMP                                                      ->23
   11    12  E > > CATCH                                       last         'Exception'
   12    13    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         14        DO_FCALL                                      0  $5      
         15        CONCAT                                           ~6      $5, '%0A'
         16        ECHO                                                     ~6
   13    17        ECHO                                                     'Now+the+Error%3A%0A'
   14    18        INIT_METHOD_CALL                                         !1, 'getPrevious'
         19        DO_FCALL                                      0  $7      
         20        INIT_METHOD_CALL                                         $7, 'getMessage'
         21        DO_FCALL                                      0  $8      
         22        ECHO                                                     $8
   15    23    > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MR3SS
function name:  foo
number of ops:  2
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.3 ms | 1399 KiB | 14 Q