3v4l.org

run code in 300+ PHP versions simultaneously
<?php function wtf() { throw new \Exception('bbq'); } try { echo "as cuf\n"; call_user_func('wtf'); } catch (\Exception $e) { echo $e->getTraceAsString(); } try { wtf(); } catch (\Exception $e) { echo "as func call\n"; echo $e->getTraceAsString(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
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 = 42) Position 1 = 16
Branch analysis from position: 16
Found catch point at position: 11
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pVN70
function name:  (null)
number of ops:  17
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'as+cuf%0A'
    9     1        INIT_FCALL                                               'wtf'
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->8
   11     4  E > > CATCH                                       last         'Exception'
   12     5    >   INIT_METHOD_CALL                                         !0, 'getTraceAsString'
          6        DO_FCALL                                      0  $2      
          7        ECHO                                                     $2
   16     8    >   INIT_FCALL                                               'wtf'
          9        DO_FCALL                                      0          
         10      > JMP                                                      ->16
   18    11  E > > CATCH                                       last         'Exception'
   19    12    >   ECHO                                                     'as+func+call%0A'
   20    13        INIT_METHOD_CALL                                         !0, 'getTraceAsString'
         14        DO_FCALL                                      0  $4      
         15        ECHO                                                     $4
   21    16    > > RETURN                                                   1

Function wtf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/pVN70
function name:  wtf
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'bbq'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    5     4*     > RETURN                                                   null

End of function wtf

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.93 ms | 1399 KiB | 15 Q