3v4l.org

run code in 300+ PHP versions simultaneously
<?php $servername = "localhost"; $username = "root"; $password = ""; $conn = new mysql($servername, $username, $password); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } //this is for create the DB. $sql = "Create database A_2"; if ($conn->query($sql) === TRUE) { echo "Success! Database created"; } else { echo "Chomp! There is an error, please check:" . $conn->error; } $conn->close(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qqhZ5
function name:  (null)
number of ops:  28
compiled vars:  !0 = $servername, !1 = $username, !2 = $password, !3 = $conn, !4 = $sql
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'localhost'
    3     1        ASSIGN                                                   !1, 'root'
    4     2        ASSIGN                                                   !2, ''
    6     3        NEW                                              $8      'mysql'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !3, $8
    8     9        FETCH_OBJ_R                                      ~11     !3, 'connect_error'
         10      > JMPZ                                                     ~11, ->14
    9    11    >   FETCH_OBJ_R                                      ~12     !3, 'connect_error'
         12        CONCAT                                           ~13     'Connection+failed%3A+', ~12
         13      > EXIT                                                     ~13
   13    14    >   ASSIGN                                                   !4, 'Create+database+A_2'
   14    15        INIT_METHOD_CALL                                         !3, 'query'
         16        SEND_VAR_EX                                              !4
         17        DO_FCALL                                      0  $15     
         18        TYPE_CHECK                                    8          $15
         19      > JMPZ                                                     ~16, ->22
   15    20    >   ECHO                                                     'Success%21+Database+created'
         21      > JMP                                                      ->25
   17    22    >   FETCH_OBJ_R                                      ~17     !3, 'error'
         23        CONCAT                                           ~18     'Chomp%21+There+is+an+error%2C+please+check%3A', ~17
         24        ECHO                                                     ~18
   20    25    >   INIT_METHOD_CALL                                         !3, 'close'
         26        DO_FCALL                                      0          
   21    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.55 ms | 1395 KiB | 13 Q