3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $x = new PDO('mysql:host=nope', 'meh', 'foo'); } catch(Exception $e) { print_r($e->errorInfo); var_dump($e->getCode()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AA6ek
function name:  (null)
number of ops:  18
compiled vars:  !0 = $x, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'PDO'
          1        SEND_VAL_EX                                              'mysql%3Ahost%3Dnope'
          2        SEND_VAL_EX                                              'meh'
          3        SEND_VAL_EX                                              'foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
          6      > JMP                                                      ->17
    4     7  E > > CATCH                                       last         'Exception'
    5     8    >   INIT_FCALL                                               'print_r'
          9        FETCH_OBJ_R                                      ~5      !1, 'errorInfo'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
    6    12        INIT_FCALL                                               'var_dump'
         13        INIT_METHOD_CALL                                         !1, 'getCode'
         14        DO_FCALL                                      0  $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                                 
    7    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.98 ms | 1395 KiB | 17 Q