3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'jobboard'; $password = 'games22'; $host = "db4free.org"; $dbname = 'jobboard'; try { $db = new PDO("mysql:host={$host};dbname={$dbname};port={3306};charset=utf8", $username, $password); } catch(PDOException $ex) { die("Failed to connect to the database: " . $ex->getMessage()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 16
Branch analysis from position: 16
2 jumps found. (Code = 107) Position 1 = 17, Position 2 = -2
Branch analysis from position: 17
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/UA8PQ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $username, !1 = $password, !2 = $host, !3 = $dbname, !4 = $db, !5 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'jobboard'
    4     1        ASSIGN                                                   !1, 'games22'
    5     2        ASSIGN                                                   !2, 'db4free.org'
    6     3        ASSIGN                                                   !3, 'jobboard'
   10     4        NEW                                              $10     'PDO'
          5        ROPE_INIT                                     5  ~12     'mysql%3Ahost%3D'
          6        ROPE_ADD                                      1  ~12     ~12, !2
          7        ROPE_ADD                                      2  ~12     ~12, '%3Bdbname%3D'
          8        ROPE_ADD                                      3  ~12     ~12, !3
          9        ROPE_END                                      4  ~11     ~12, '%3Bport%3D%7B3306%7D%3Bcharset%3Dutf8'
         10        SEND_VAL_EX                                              ~11
         11        SEND_VAR_EX                                              !0
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !4, $10
         15      > JMP                                                      ->21
   12    16  E > > CATCH                                       last         'PDOException'
   14    17    >   INIT_METHOD_CALL                                         !5, 'getMessage'
         18        DO_FCALL                                      0  $17     
         19        CONCAT                                           ~18     'Failed+to+connect+to+the+database%3A+', $17
         20      > EXIT                                                     ~18
   15    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.85 ms | 1385 KiB | 13 Q