3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('DB_NAME', 'messages'); define('DB_USER', 'root'); define('DB_PASSWORD', ''); define('DB_HOST', 'localhost'); $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if (!$link) { die('Could not connect: ' . mysql_error()); } $db_selected = mysql_select_db(DB_NAME, $link); if (!$db_selected) { die('Can\'t use ' . DB_NAME . ': ' . mysql_error()); } echo 'Connected succesfuly'; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 31
Branch analysis from position: 27
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 46
Branch analysis from position: 39
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MOmId
function name:  (null)
number of ops:  48
compiled vars:  !0 = $link, !1 = $db_selected
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'DB_NAME'
          2        SEND_VAL                                                 'messages'
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'DB_USER'
          6        SEND_VAL                                                 'root'
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'define'
          9        SEND_VAL                                                 'DB_PASSWORD'
         10        SEND_VAL                                                 ''
         11        DO_ICALL                                                 
    6    12        INIT_FCALL                                               'define'
         13        SEND_VAL                                                 'DB_HOST'
         14        SEND_VAL                                                 'localhost'
         15        DO_ICALL                                                 
    8    16        INIT_FCALL_BY_NAME                                       'mysql_connect'
         17        FETCH_CONSTANT                                   ~6      'DB_HOST'
         18        SEND_VAL_EX                                              ~6
         19        FETCH_CONSTANT                                   ~7      'DB_USER'
         20        SEND_VAL_EX                                              ~7
         21        FETCH_CONSTANT                                   ~8      'DB_PASSWORD'
         22        SEND_VAL_EX                                              ~8
         23        DO_FCALL                                      0  $9      
         24        ASSIGN                                                   !0, $9
   10    25        BOOL_NOT                                         ~11     !0
         26      > JMPZ                                                     ~11, ->31
   11    27    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         28        DO_FCALL                                      0  $12     
         29        CONCAT                                           ~13     'Could+not+connect%3A+', $12
         30      > EXIT                                                     ~13
   14    31    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         32        FETCH_CONSTANT                                   ~14     'DB_NAME'
         33        SEND_VAL_EX                                              ~14
         34        SEND_VAR_EX                                              !0
         35        DO_FCALL                                      0  $15     
         36        ASSIGN                                                   !1, $15
   16    37        BOOL_NOT                                         ~17     !1
         38      > JMPZ                                                     ~17, ->46
   17    39    >   FETCH_CONSTANT                                   ~18     'DB_NAME'
         40        CONCAT                                           ~19     'Can%27t+use+', ~18
         41        CONCAT                                           ~20     ~19, '%3A+'
         42        INIT_FCALL_BY_NAME                                       'mysql_error'
         43        DO_FCALL                                      0  $21     
         44        CONCAT                                           ~22     ~20, $21
         45      > EXIT                                                     ~22
   20    46    >   ECHO                                                     'Connected+succesfuly'
   22    47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.37 ms | 1400 KiB | 15 Q