3v4l.org

run code in 300+ PHP versions simultaneously
<?php $conn = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$conn) { die('Could not connect: ' . mysql_error()); } mysql_select_db('database'); $result = mysql_query('select * from table'); if (!$result) { die('Query failed: ' . mysql_error()); } /* get column metadata */ $i = 0; while ($i < mysql_num_fields($result)) { echo "Information for column $i:<br />\n"; $meta = mysql_fetch_field($result, $i); if (!$meta) { echo "No information available<br />\n"; } echo "<pre> blob: $meta->blob max_length: $meta->max_length multiple_key: $meta->multiple_key name: $meta->name not_null: $meta->not_null numeric: $meta->numeric primary_key: $meta->primary_key table: $meta->table type: $meta->type unique_key: $meta->unique_key unsigned: $meta->unsigned zerofill: $meta->zerofill </pre>"; $i++; } mysql_free_result($result); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 78
Branch analysis from position: 78
2 jumps found. (Code = 44) Position 1 = 83, Position 2 = 27
Branch analysis from position: 83
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 83, Position 2 = 27
Branch analysis from position: 83
Branch analysis from position: 27
Branch analysis from position: 39
filename:       /in/DmHih
function name:  (null)
number of ops:  87
compiled vars:  !0 = $conn, !1 = $result, !2 = $i, !3 = $meta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'mysql_connect'
          1        SEND_VAL_EX                                              'localhost'
          2        SEND_VAL_EX                                              'mysql_user'
          3        SEND_VAL_EX                                              'mysql_password'
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !0, $4
    3     6        BOOL_NOT                                         ~6      !0
          7      > JMPZ                                                     ~6, ->12
    4     8    >   INIT_FCALL_BY_NAME                                       'mysql_error'
          9        DO_FCALL                                      0  $7      
         10        CONCAT                                           ~8      'Could+not+connect%3A+', $7
         11      > EXIT                                                     ~8
    6    12    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         13        SEND_VAL_EX                                              'database'
         14        DO_FCALL                                      0          
    7    15        INIT_FCALL_BY_NAME                                       'mysql_query'
         16        SEND_VAL_EX                                              'select+%2A+from+table'
         17        DO_FCALL                                      0  $10     
         18        ASSIGN                                                   !1, $10
    8    19        BOOL_NOT                                         ~12     !1
         20      > JMPZ                                                     ~12, ->25
    9    21    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         22        DO_FCALL                                      0  $13     
         23        CONCAT                                           ~14     'Query+failed%3A+', $13
         24      > EXIT                                                     ~14
   12    25    >   ASSIGN                                                   !2, 0
   13    26      > JMP                                                      ->78
   14    27    >   ROPE_INIT                                     3  ~17     'Information+for+column+'
         28        ROPE_ADD                                      1  ~17     ~17, !2
         29        ROPE_END                                      2  ~16     ~17, '%3A%3Cbr+%2F%3E%0A'
         30        ECHO                                                     ~16
   15    31        INIT_FCALL_BY_NAME                                       'mysql_fetch_field'
         32        SEND_VAR_EX                                              !1
         33        SEND_VAR_EX                                              !2
         34        DO_FCALL                                      0  $19     
         35        ASSIGN                                                   !3, $19
   16    36        BOOL_NOT                                         ~21     !3
         37      > JMPZ                                                     ~21, ->39
   17    38    >   ECHO                                                     'No+information+available%3Cbr+%2F%3E%0A'
   19    39    >   ROPE_INIT                                    25  ~35     '%3Cpre%3E%0Ablob%3A+++++++++'
   20    40        FETCH_OBJ_R                                      ~22     !3, 'blob'
         41        ROPE_ADD                                      1  ~35     ~35, ~22
         42        ROPE_ADD                                      2  ~35     ~35, '%0Amax_length%3A+++'
   21    43        FETCH_OBJ_R                                      ~23     !3, 'max_length'
         44        ROPE_ADD                                      3  ~35     ~35, ~23
         45        ROPE_ADD                                      4  ~35     ~35, '%0Amultiple_key%3A+'
   22    46        FETCH_OBJ_R                                      ~24     !3, 'multiple_key'
         47        ROPE_ADD                                      5  ~35     ~35, ~24
         48        ROPE_ADD                                      6  ~35     ~35, '%0Aname%3A+++++++++'
   23    49        FETCH_OBJ_R                                      ~25     !3, 'name'
         50        ROPE_ADD                                      7  ~35     ~35, ~25
         51        ROPE_ADD                                      8  ~35     ~35, '%0Anot_null%3A+++++'
   24    52        FETCH_OBJ_R                                      ~26     !3, 'not_null'
         53        ROPE_ADD                                      9  ~35     ~35, ~26
         54        ROPE_ADD                                     10  ~35     ~35, '%0Anumeric%3A++++++'
   25    55        FETCH_OBJ_R                                      ~27     !3, 'numeric'
         56        ROPE_ADD                                     11  ~35     ~35, ~27
         57        ROPE_ADD                                     12  ~35     ~35, '%0Aprimary_key%3A++'
   26    58        FETCH_OBJ_R                                      ~28     !3, 'primary_key'
         59        ROPE_ADD                                     13  ~35     ~35, ~28
         60        ROPE_ADD                                     14  ~35     ~35, '%0Atable%3A++++++++'
   27    61        FETCH_OBJ_R                                      ~29     !3, 'table'
         62        ROPE_ADD                                     15  ~35     ~35, ~29
         63        ROPE_ADD                                     16  ~35     ~35, '%0Atype%3A+++++++++'
   28    64        FETCH_OBJ_R                                      ~30     !3, 'type'
         65        ROPE_ADD                                     17  ~35     ~35, ~30
         66        ROPE_ADD                                     18  ~35     ~35, '%0Aunique_key%3A+++'
   29    67        FETCH_OBJ_R                                      ~31     !3, 'unique_key'
         68        ROPE_ADD                                     19  ~35     ~35, ~31
         69        ROPE_ADD                                     20  ~35     ~35, '%0Aunsigned%3A+++++'
   30    70        FETCH_OBJ_R                                      ~32     !3, 'unsigned'
         71        ROPE_ADD                                     21  ~35     ~35, ~32
         72        ROPE_ADD                                     22  ~35     ~35, '%0Azerofill%3A+++++'
   31    73        FETCH_OBJ_R                                      ~33     !3, 'zerofill'
         74        ROPE_ADD                                     23  ~35     ~35, ~33
         75        ROPE_END                                     24  ~34     ~35, '%0A%3C%2Fpre%3E'
         76        ECHO                                                     ~34
   33    77        PRE_INC                                                  !2
   13    78    >   INIT_FCALL_BY_NAME                                       'mysql_num_fields'
         79        SEND_VAR_EX                                              !1
         80        DO_FCALL                                      0  $49     
         81        IS_SMALLER                                               !2, $49
         82      > JMPNZ                                                    ~50, ->27
   35    83    >   INIT_FCALL_BY_NAME                                       'mysql_free_result'
         84        SEND_VAR_EX                                              !1
         85        DO_FCALL                                      0          
   36    86      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.64 ms | 1407 KiB | 13 Q