3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $pdo = new PDO('sqlite::memory:', '', [], [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]); var_dump(is_null($pdo)); } catch(TypeError $e) { var_dump($e->getMessage()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jfChu
function name:  (null)
number of ops:  19
compiled vars:  !0 = $pdo, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'PDO'
          1        SEND_VAL_EX                                              'sqlite%3A%3Amemory%3A'
          2        SEND_VAL_EX                                              ''
          3        SEND_VAL_EX                                              <array>
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
    5     7        INIT_FCALL                                               'var_dump'
          8        TYPE_CHECK                                    2  ~5      !0
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
         11      > JMP                                                      ->18
    6    12  E > > CATCH                                       last         'TypeError'
    7    13    >   INIT_FCALL                                               'var_dump'
         14        INIT_METHOD_CALL                                         !1, 'getMessage'
         15        DO_FCALL                                      0  $7      
         16        SEND_VAR                                                 $7
         17        DO_ICALL                                                 
    8    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.18 ms | 1395 KiB | 15 Q