3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $db = new PDO('mysql:host=localhost;dbname=test', 'username', 'password'); } catch (BadMethodCallException $e) { echo $e->getMessage() . "\n"; } finally { echo 'finally'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 162) Position 1 = 14, Position 2 = 13
Branch analysis from position: 14
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
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
2 jumps found. (Code = 162) Position 1 = 14, Position 2 = 13
Branch analysis from position: 14
Branch analysis from position: 13
filename:       /in/AEtmC
function name:  (null)
number of ops:  17
compiled vars:  !0 = $db, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $3      'PDO'
          1        SEND_VAL_EX                                              'mysql%3Ahost%3Dlocalhost%3Bdbname%3Dtest'
          2        SEND_VAL_EX                                              'username'
          3        SEND_VAL_EX                                              'password'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
          6      > JMP                                                      ->12
    6     7  E > > CATCH                                       last         'BadMethodCallException'
    7     8    >   INIT_METHOD_CALL                                         !1, 'getMessage'
          9        DO_FCALL                                      0  $6      
         10        CONCAT                                           ~7      $6, '%0A'
         11        ECHO                                                     ~7
    9    12    > > FAST_CALL                                                ->14
         13    > > JMP                                                      ->16
   10    14    >   ECHO                                                     'finally'
         15      > FAST_RET                                                 
   11    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.86 ms | 1394 KiB | 13 Q