3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dbname = ''; $dbuser = 'barry'; $dbpass = 'Barry123$'; $dbhost = 'mysql://thrive-lms.cgbwgdsqerhj.ap-southeast-2.rds.amazonaws.com'; $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); mysql_select_db($dbname) or die("Could not open the db '$dbname'"); $test_query = "SHOW TABLES FROM $dbname"; $result = mysql_query($test_query); $tblCnt = 0; while($tbl = mysql_fetch_array($result)) { $tblCnt++; } if (!$tblCnt) { echo "There are no tables<br />n"; } else { echo "There are $tblCnt tables<br />n"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 47) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 34
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 44
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 34
Branch analysis from position: 40
Branch analysis from position: 34
filename:       /in/eZGhl
function name:  (null)
number of ops:  49
compiled vars:  !0 = $dbname, !1 = $dbuser, !2 = $dbpass, !3 = $dbhost, !4 = $connect, !5 = $test_query, !6 = $result, !7 = $tblCnt, !8 = $tbl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        ASSIGN                                                   !1, 'barry'
    5     2        ASSIGN                                                   !2, 'Barry123%24'
    6     3        ASSIGN                                                   !3, 'mysql%3A%2F%2Fthrive-lms.cgbwgdsqerhj.ap-southeast-2.rds.amazonaws.com'
    7     4        INIT_FCALL_BY_NAME                                       'mysql_connect'
          5        SEND_VAR_EX                                              !3
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0  $13     
          9        ASSIGN                                           ~14     !4, $13
         10      > JMPNZ_EX                                         ~14     ~14, ->16
         11    >   ROPE_INIT                                     3  ~16     'Unable+to+Connect+to+%27'
         12        ROPE_ADD                                      1  ~16     ~16, !3
         13        ROPE_END                                      2  ~15     ~16, '%27'
         14      > EXIT                                                     ~15
         15*       BOOL                                             ~14     <true>
    8    16    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $18     
         19      > JMPNZ_EX                                         ~19     $18, ->25
         20    >   ROPE_INIT                                     3  ~21     'Could+not+open+the+db+%27'
         21        ROPE_ADD                                      1  ~21     ~21, !0
         22        ROPE_END                                      2  ~20     ~21, '%27'
         23      > EXIT                                                     ~20
         24*       BOOL                                             ~19     <true>
    9    25    >   NOP                                                      
         26        FAST_CONCAT                                      ~23     'SHOW+TABLES+FROM+', !0
         27        ASSIGN                                                   !5, ~23
   10    28        INIT_FCALL_BY_NAME                                       'mysql_query'
         29        SEND_VAR_EX                                              !5
         30        DO_FCALL                                      0  $25     
         31        ASSIGN                                                   !6, $25
   11    32        ASSIGN                                                   !7, 0
   12    33      > JMP                                                      ->35
   13    34    >   PRE_INC                                                  !7
   12    35    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         36        SEND_VAR_EX                                              !6
         37        DO_FCALL                                      0  $29     
         38        ASSIGN                                           ~30     !8, $29
         39      > JMPNZ                                                    ~30, ->34
   16    40    >   BOOL_NOT                                         ~31     !7
         41      > JMPZ                                                     ~31, ->44
   17    42    >   ECHO                                                     'There+are+no+tables%3Cbr+%2F%3En'
         43      > JMP                                                      ->48
   19    44    >   ROPE_INIT                                     3  ~33     'There+are+'
         45        ROPE_ADD                                      1  ~33     ~33, !7
         46        ROPE_END                                      2  ~32     ~33, '+tables%3Cbr+%2F%3En'
         47        ECHO                                                     ~32
   22    48    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.59 ms | 1399 KiB | 13 Q