3v4l.org

run code in 500+ PHP versions simultaneously
<?php function dbconnect($host,$user, $pass) { throw new \PDOException('PDO connection error: '); } try { dbconnect('host','user', 'pass'); } catch (\PDOException $e) { //die('PDO connection error: ' . $e->getMessage()); throw new \Exception('PDO connection error: ' . $e->getMessage()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
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 = 108) Position 1 = -2
filename:       /in/TONk0
function name:  (null)
number of ops:  15
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                                   'dbconnect'
          1        SEND_VAL                                                     'host'
          2        SEND_VAL                                                     'user'
          3        SEND_VAL                                                     'pass'
          4        DO_FCALL                                          0          
          5      > JMP                                                          ->14
   10     6  E > > CATCH                                           last         'PDOException'
   12     7    >   NEW                                                  $2      'Exception'
          8        INIT_METHOD_CALL                                             !0, 'getMessage'
          9        DO_FCALL                                          0  $3      
         10        CONCAT                                               ~4      'PDO+connection+error%3A+', $3
         11        SEND_VAL_EX                                                  ~4
         12        DO_FCALL                                          0          
         13      > THROW                                             0          $2
   13    14    > > RETURN                                                       1

Function dbconnect:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/TONk0
function name:  dbconnect
number of ops:  8
compiled vars:  !0 = $host, !1 = $user, !2 = $pass
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
    5     3        NEW                                                  $3      'PDOException'
          4        SEND_VAL_EX                                                  'PDO+connection+error%3A+'
          5        DO_FCALL                                          0          
          6      > THROW                                             0          $3
    6     7*     > RETURN                                                       null

End of function dbconnect

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.28 ms | 2141 KiB | 14 Q