3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $conn = new \PDO('mysql:host=localhost;'); } catch (\PDOException $e) { var_dump(array($e->getCode(), $e->errorInfo)); }
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: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TU1RV
function name:  (null)
number of ops:  15
compiled vars:  !0 = $conn, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'PDO'
          1        SEND_VAL_EX                                              'mysql%3Ahost%3Dlocalhost%3B'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
          4      > JMP                                                      ->14
    5     5  E > > CATCH                                       last         'PDOException'
    6     6    >   INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !1, 'getCode'
          8        DO_FCALL                                      0  $5      
          9        INIT_ARRAY                                       ~6      $5
         10        FETCH_OBJ_R                                      ~7      !1, 'errorInfo'
         11        ADD_ARRAY_ELEMENT                                ~6      ~7
         12        SEND_VAL                                                 ~6
         13        DO_ICALL                                                 
    7    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
196.07 ms | 1394 KiB | 15 Q