3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a(string $v) { throw new Exception; } try { a("vvv"); } catch (Exception $exception) { printf( "%s: %s in %s:%d\nStack trace:\n%s\n", get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine(), $exception->getTraceAsString() ); }
Finding entry points
Branch analysis from position: 0
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: 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 = 62) Position 1 = -2
filename:       /in/A2Cho
function name:  (null)
number of ops:  23
compiled vars:  !0 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'a'
          1        SEND_VAL                                                 'vvv'
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->22
   11     4  E > > CATCH                                       last         'Exception'
   13     5    >   INIT_FCALL                                               'printf'
   14     6        SEND_VAL                                                 '%25s%3A+%25s+in+%25s%3A%25d%0AStack+trace%3A%0A%25s%0A'
   15     7        GET_CLASS                                        ~2      !0
          8        SEND_VAL                                                 ~2
   16     9        INIT_METHOD_CALL                                         !0, 'getMessage'
         10        DO_FCALL                                      0  $3      
         11        SEND_VAR                                                 $3
   17    12        INIT_METHOD_CALL                                         !0, 'getFile'
         13        DO_FCALL                                      0  $4      
         14        SEND_VAR                                                 $4
   18    15        INIT_METHOD_CALL                                         !0, 'getLine'
         16        DO_FCALL                                      0  $5      
         17        SEND_VAR                                                 $5
   19    18        INIT_METHOD_CALL                                         !0, 'getTraceAsString'
         19        DO_FCALL                                      0  $6      
         20        SEND_VAR                                                 $6
         21        DO_ICALL                                                 
   21    22    > > RETURN                                                   1

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

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.58 ms | 1399 KiB | 16 Q