1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 7 | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 1997-2018 The PHP Group | 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.01 of the PHP license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 15 | Authors: Georg Richter <georg@php.net> | 16 | Andrey Hristov <andrey@php.net> | 17 | Ulf Wendel <uw@php.net> | 18 +----------------------------------------------------------------------+ 19 20 $Id$ 21 */ 22 23 #ifdef HAVE_CONFIG_H 24 #include "config.h" 25 #endif 26 27 #include <signal.h> 28 29 #include "php.h" 30 #include "php_ini.h" 31 #include "ext/standard/info.h" 32 #include "php_mysqli_structs.h" 33 #include "mysqli_fe.h" 34 #include "mysqli_priv.h" 35 36 #ifdef MYSQLI_USE_FULL_TYPED_ARGINFO_0 37 #define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_OBJ_INFO(0, link, mysqli, 0) 38 #define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) 39 #define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) 40 #else 41 #define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_INFO(0, link) 42 #define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_INFO(0, result) 43 #define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_INFO(0, stmt) 44 #endif 45 46 ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_result, 0) 47 MYSQLI_ZEND_ARG_OBJ_INFO_STMT() 48 ZEND_ARG_VARIADIC_INFO(1, vars) 49 ZEND_END_ARG_INFO() 50 51 ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_param, 0) 52 MYSQLI_ZEND_ARG_OBJ_INFO_STMT() 53 ZEND_ARG_INFO(0, types) 54 ZEND_ARG_VARIADIC_INFO(1, vars) 55 ZEND_END_ARG_INFO() 56 57 ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_result, 0) 58 ZEND_ARG_VARIADIC_INFO(1, vars) 59 ZEND_END_ARG_INFO() 60 61 ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_param, 0) 62 ZEND_ARG_INFO(0, types) 63 ZEND_ARG_VARIADIC_INFO(1, vars) 64 ZEND_END_ARG_INFO() 65 66 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_poll, 0, 0, 4) 67 ZEND_ARG_ARRAY_INFO(1, read, 1) 68 ZEND_ARG_ARRAY_INFO(1, write, 1) 69 ZEND_ARG_ARRAY_INFO(1, error, 1) 70 ZEND_ARG_INFO(0, sec) 71 ZEND_ARG_INFO(0, usec) 72 ZEND_END_ARG_INFO() 73 74 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_no_params, 0, 0, 0) 75 ZEND_END_ARG_INFO() 76 77 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_link, 0, 0, 1) 78 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 79 ZEND_END_ARG_INFO() 80 81 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_autocommit, 0, 0, 2) 82 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 83 ZEND_ARG_INFO(0, mode) 84 ZEND_END_ARG_INFO() 85 86 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1) 87 ZEND_ARG_INFO(0, mode) 88 ZEND_END_ARG_INFO() 89 90 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_begin_transaction, 0, 0, 1) 91 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 92 ZEND_ARG_INFO(0, flags) 93 ZEND_ARG_INFO(0, name) 94 ZEND_END_ARG_INFO() 95 96 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_begin_transaction, 0, 0, 0) 97 ZEND_ARG_INFO(0, flags) 98 ZEND_ARG_INFO(0, name) 99 ZEND_END_ARG_INFO() 100 101 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_savepoint, 0, 0, 2) 102 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 103 ZEND_ARG_INFO(0, name) 104 ZEND_END_ARG_INFO() 105 106 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_savepoint, 0, 0, 1) 107 ZEND_ARG_INFO(0, name) 108 ZEND_END_ARG_INFO() 109 110 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_release_savepoint, 0, 0, 2) 111 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 112 ZEND_ARG_INFO(0, name) 113 ZEND_END_ARG_INFO() 114 115 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_release_savepoint, 0, 0, 1) 116 ZEND_ARG_INFO(0, name) 117 ZEND_END_ARG_INFO() 118 119 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_commit, 0, 0, 1) 120 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 121 ZEND_ARG_INFO(0, flags) 122 ZEND_ARG_INFO(0, name) 123 ZEND_END_ARG_INFO() 124 125 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_commit, 0, 0, 0) 126 ZEND_ARG_INFO(0, flags) 127 ZEND_ARG_INFO(0, name) 128 ZEND_END_ARG_INFO() 129 130 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_rollback, 0, 0, 1) 131 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 132 ZEND_ARG_INFO(0, flags) 133 ZEND_ARG_INFO(0, name) 134 ZEND_END_ARG_INFO() 135 136 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_rollback, 0, 0, 0) 137 ZEND_ARG_INFO(0, flags) 138 ZEND_ARG_INFO(0, name) 139 ZEND_END_ARG_INFO() 140 141 142 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_store_result, 0, 0, 1) 143 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 144 ZEND_ARG_INFO(0, flags) 145 ZEND_END_ARG_INFO() 146 147 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_store_result, 0, 0, 0) 148 ZEND_ARG_INFO(0, flags) 149 ZEND_END_ARG_INFO() 150 151 152 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_change_user, 0, 0, 4) 153 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 154 ZEND_ARG_INFO(0, user) 155 ZEND_ARG_INFO(0, password) 156 ZEND_ARG_INFO(0, database) 157 ZEND_END_ARG_INFO() 158 159 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_change_user, 0, 0, 3) 160 ZEND_ARG_INFO(0, user) 161 ZEND_ARG_INFO(0, password) 162 ZEND_ARG_INFO(0, database) 163 ZEND_END_ARG_INFO() 164 165 166 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_connect, 0, 0, 0) 167 ZEND_ARG_INFO(0, host) 168 ZEND_ARG_INFO(0, user) 169 ZEND_ARG_INFO(0, password) 170 ZEND_ARG_INFO(0, database) 171 ZEND_ARG_INFO(0, port) 172 ZEND_ARG_INFO(0, socket) 173 ZEND_END_ARG_INFO() 174 175 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_connect, 0, 0, 1) 176 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 177 ZEND_ARG_INFO(0, host) 178 ZEND_ARG_INFO(0, user) 179 ZEND_ARG_INFO(0, password) 180 ZEND_ARG_INFO(0, database) 181 ZEND_ARG_INFO(0, port) 182 ZEND_ARG_INFO(0, socket) 183 ZEND_ARG_INFO(0, flags) 184 ZEND_END_ARG_INFO() 185 186 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_connect, 0, 0, 0) 187 ZEND_ARG_INFO(0, host) 188 ZEND_ARG_INFO(0, user) 189 ZEND_ARG_INFO(0, password) 190 ZEND_ARG_INFO(0, database) 191 ZEND_ARG_INFO(0, port) 192 ZEND_ARG_INFO(0, socket) 193 ZEND_ARG_INFO(0, flags) 194 ZEND_END_ARG_INFO() 195 196 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_result, 0, 0, 1) 197 MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() 198 ZEND_END_ARG_INFO() 199 200 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_statement, 0, 0, 1) 201 MYSQLI_ZEND_ARG_OBJ_INFO_STMT() 202 ZEND_END_ARG_INFO() 203 204 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_data_seek, 0, 0, 2) 205 MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() 206 ZEND_ARG_INFO(0, offset) 207 ZEND_END_ARG_INFO() 208 209 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_data_seek, 0, 0, 2) 210 MYSQLI_ZEND_ARG_OBJ_INFO_STMT() 211 ZEND_ARG_INFO(0, offset) 212 ZEND_END_ARG_INFO() 213 214 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_data_seek, 0, 0, 1) 215 ZEND_ARG_INFO(0, offset) 216 ZEND_END_ARG_INFO() 217 218 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_debug, 0, 0, 1) 219 ZEND_ARG_INFO(0, debug_options) 220 ZEND_END_ARG_INFO() 221 222 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_result_and_fieldnr, 0, 0, 2) 223 MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() 224 ZEND_ARG_INFO(0, field_nr) 225 ZEND_END_ARG_INFO() 226 227 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_and_fieldnr, 0, 0, 1) 228 ZEND_ARG_INFO(0, field_nr) 229 ZEND_END_ARG_INFO() 230 231 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_fetch_array, 0, 0, 1) 232 MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() 233 ZEND_ARG_INFO(0, result_type) 234 ZEND_END_ARG_INFO() 235 236 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_fetch_array, 0, 0, 0) 237 ZEND_ARG_INFO(0, result_type) 238 ZEND_END_ARG_INFO() 239 240 241 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_fetch_object, 0, 0, 1) 242 MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() 243 ZEND_ARG_INFO(0, class_name) 244 ZEND_ARG_ARRAY_INFO(0, params, 0) 245 ZEND_END_ARG_INFO() 246 247 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_fetch_object, 0, 0, 0) 248 ZEND_ARG_INFO(0, class_name) 249 ZEND_ARG_ARRAY_INFO(0, params, 0) 250 ZEND_END_ARG_INFO() 251 252 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_kill, 0, 0, 2) 253 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 254 ZEND_ARG_INFO(0, connection_id) 255 ZEND_END_ARG_INFO() 256 257 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_kill, 0, 0, 1) 258 ZEND_ARG_INFO(0, connection_id) 259 ZEND_END_ARG_INFO() 260 261 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_query, 0, 0, 2) 262 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 263 ZEND_ARG_INFO(0, query) 264 ZEND_ARG_INFO(0, resultmode) 265 ZEND_END_ARG_INFO() 266 267 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_multi_query, 0, 0, 1) 268 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 269 ZEND_ARG_INFO(0, query) 270 ZEND_END_ARG_INFO() 271 272 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_query, 0, 0, 1) 273 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 274 ZEND_ARG_INFO(0, query) 275 ZEND_END_ARG_INFO() 276 277 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_prepare, 0, 0, 2) 278 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 279 ZEND_ARG_INFO(0, query) 280 ZEND_END_ARG_INFO() 281 282 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_prepare, 0, 0, 2) 283 MYSQLI_ZEND_ARG_OBJ_INFO_STMT() 284 ZEND_ARG_INFO(0, query) 285 ZEND_END_ARG_INFO() 286 287 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_query, 0, 0, 1) 288 ZEND_ARG_INFO(0, query) 289 ZEND_ARG_INFO(0, resultmode) 290 ZEND_END_ARG_INFO() 291 292 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_prepare, 0, 0, 1) 293 ZEND_ARG_INFO(0, query) 294 ZEND_END_ARG_INFO() 295 296 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_multi_query, 0, 0, 1) 297 ZEND_ARG_INFO(0, query) 298 ZEND_END_ARG_INFO() 299 300 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_query, 0, 0, 1) 301 ZEND_ARG_INFO(0, query) 302 ZEND_END_ARG_INFO() 303 304 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_options, 0, 0, 3) 305 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 306 ZEND_ARG_INFO(0, option) 307 ZEND_ARG_INFO(0, value) 308 ZEND_END_ARG_INFO() 309 310 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_options, 0, 0, 2) 311 ZEND_ARG_INFO(0, option) 312 ZEND_ARG_INFO(0, value) 313 ZEND_END_ARG_INFO() 314 315 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_report, 0, 0, 1) 316 ZEND_ARG_INFO(0, flags) 317 ZEND_END_ARG_INFO() 318 319 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_escape_string, 0, 0, 2) 320 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 321 ZEND_ARG_INFO(0, string_to_escape) 322 ZEND_END_ARG_INFO() 323 324 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_escape_string, 0, 0, 1) 325 ZEND_ARG_INFO(0, string_to_escape) 326 ZEND_END_ARG_INFO() 327 328 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_select_db, 0, 0, 2) 329 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 330 ZEND_ARG_INFO(0, database) 331 ZEND_END_ARG_INFO() 332 333 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_select_db, 0, 0, 1) 334 ZEND_ARG_INFO(0, database) 335 ZEND_END_ARG_INFO() 336 337 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_set_charset, 0, 0, 2) 338 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 339 ZEND_ARG_INFO(0, charset) 340 ZEND_END_ARG_INFO() 341 342 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_charset, 0, 0, 1) 343 ZEND_ARG_INFO(0, charset) 344 ZEND_END_ARG_INFO() 345 346 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_attr_get, 0, 0, 2) 347 MYSQLI_ZEND_ARG_OBJ_INFO_STMT() 348 ZEND_ARG_INFO(0, attribute) 349 ZEND_END_ARG_INFO() 350 351 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_get, 0, 0, 1) 352 ZEND_ARG_INFO(0, attribute) 353 ZEND_END_ARG_INFO() 354 355 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_attr_set, 0, 0, 3) 356 MYSQLI_ZEND_ARG_OBJ_INFO_STMT() 357 ZEND_ARG_INFO(0, attribute) 358 ZEND_ARG_INFO(0, value) 359 ZEND_END_ARG_INFO() 360 361 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_set, 0, 0, 2) 362 ZEND_ARG_INFO(0, attribute) 363 ZEND_ARG_INFO(0, value) 364 ZEND_END_ARG_INFO() 365 366 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_send_long_data, 0, 0, 3) 367 MYSQLI_ZEND_ARG_OBJ_INFO_STMT() 368 ZEND_ARG_INFO(0, param_nr) 369 ZEND_ARG_INFO(0, data) 370 ZEND_END_ARG_INFO() 371 372 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_send_long_data, 0, 0, 2) 373 ZEND_ARG_INFO(0, param_nr) 374 ZEND_ARG_INFO(0, data) 375 ZEND_END_ARG_INFO() 376 377 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_ssl_set, 0, 0, 6) 378 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 379 ZEND_ARG_INFO(0, key) 380 ZEND_ARG_INFO(0, cert) 381 ZEND_ARG_INFO(0, certificate_authority) 382 ZEND_ARG_INFO(0, certificate_authority_path) 383 ZEND_ARG_INFO(0, cipher) 384 ZEND_END_ARG_INFO() 385 386 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5) 387 ZEND_ARG_INFO(0, key) 388 ZEND_ARG_INFO(0, cert) 389 ZEND_ARG_INFO(0, certificate_authority) 390 ZEND_ARG_INFO(0, certificate_authority_path) 391 ZEND_ARG_INFO(0, cipher) 392 ZEND_END_ARG_INFO() 393 394 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_refresh, 0, 0, 2) 395 MYSQLI_ZEND_ARG_OBJ_INFO_LINK() 396 ZEND_ARG_INFO(0, options) 397 ZEND_END_ARG_INFO() 398 399 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1) 400 ZEND_ARG_INFO(0, options) 401 ZEND_END_ARG_INFO() 402 403 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_no_options, 0, 0, 0) 404 ZEND_END_ARG_INFO() 405 406 407 /* {{{ mysqli_functions[] 408 * 409 * Every user visible function must have an entry in mysqli_functions[]. 410 */ 411 const zend_function_entry mysqli_functions[] = { 412 PHP_FE(mysqli_affected_rows, arginfo_mysqli_only_link) 413 PHP_FE(mysqli_autocommit, arginfo_mysqli_autocommit) 414 PHP_FE(mysqli_begin_transaction, arginfo_mysqli_begin_transaction) 415 PHP_FE(mysqli_change_user, arginfo_mysqli_change_user) 416 PHP_FE(mysqli_character_set_name, arginfo_mysqli_only_link) 417 PHP_FE(mysqli_close, arginfo_mysqli_only_link) 418 PHP_FE(mysqli_commit, arginfo_mysqli_commit) 419 PHP_FE(mysqli_connect, arginfo_mysqli_connect) 420 PHP_FE(mysqli_connect_errno, arginfo_mysqli_no_params) 421 PHP_FE(mysqli_connect_error, arginfo_mysqli_no_params) 422 PHP_FE(mysqli_data_seek, arginfo_mysqli_data_seek) 423 PHP_FE(mysqli_dump_debug_info, arginfo_mysqli_only_link) 424 PHP_FE(mysqli_debug, arginfo_mysqli_debug) 425 #if defined(HAVE_EMBEDDED_MYSQLI) 426 PHP_FE(mysqli_embedded_server_end, NULL) 427 PHP_FE(mysqli_embedded_server_start, NULL) 428 #endif 429 PHP_FE(mysqli_errno, arginfo_mysqli_only_link) 430 PHP_FE(mysqli_error, arginfo_mysqli_only_link) 431 PHP_FE(mysqli_error_list, arginfo_mysqli_only_link) 432 PHP_FE(mysqli_stmt_execute, arginfo_mysqli_only_statement) 433 PHP_FALIAS(mysqli_execute, mysqli_stmt_execute, arginfo_mysqli_only_statement) 434 PHP_FE(mysqli_fetch_field, arginfo_mysqli_only_result) 435 PHP_FE(mysqli_fetch_fields, arginfo_mysqli_only_result) 436 PHP_FE(mysqli_fetch_field_direct, arginfo_mysqli_result_and_fieldnr) 437 PHP_FE(mysqli_fetch_lengths, arginfo_mysqli_only_result) 438 #ifdef MYSQLI_USE_MYSQLND 439 PHP_FE(mysqli_fetch_all, arginfo_mysqli_fetch_array) 440 #endif 441 PHP_FE(mysqli_fetch_array, arginfo_mysqli_fetch_array) 442 PHP_FE(mysqli_fetch_assoc, arginfo_mysqli_only_result) 443 PHP_FE(mysqli_fetch_object, arginfo_mysqli_fetch_object) 444 PHP_FE(mysqli_fetch_row, arginfo_mysqli_only_result) 445 PHP_FE(mysqli_field_count, arginfo_mysqli_only_link) 446 PHP_FE(mysqli_field_seek, arginfo_mysqli_result_and_fieldnr) 447 PHP_FE(mysqli_field_tell, arginfo_mysqli_only_result) 448 PHP_FE(mysqli_free_result, arginfo_mysqli_only_result) 449 #if defined(MYSQLI_USE_MYSQLND) 450 PHP_FE(mysqli_get_connection_stats, arginfo_mysqli_only_link) 451 PHP_FE(mysqli_get_client_stats, arginfo_mysqli_no_params) 452 #endif 453 #ifdef HAVE_MYSQLI_GET_CHARSET 454 PHP_FE(mysqli_get_charset, arginfo_mysqli_only_link) 455 #endif 456 PHP_FE(mysqli_get_client_info, arginfo_mysqli_no_options) 457 PHP_FE(mysqli_get_client_version, arginfo_mysqli_only_link) 458 PHP_FE(mysqli_get_links_stats, arginfo_mysqli_no_options) 459 PHP_FE(mysqli_get_host_info, arginfo_mysqli_only_link) 460 PHP_FE(mysqli_get_proto_info, arginfo_mysqli_only_link) 461 PHP_FE(mysqli_get_server_info, arginfo_mysqli_only_link) 462 PHP_FE(mysqli_get_server_version, arginfo_mysqli_only_link) 463 PHP_FE(mysqli_get_warnings, arginfo_mysqli_only_link) 464 PHP_FE(mysqli_init, arginfo_mysqli_no_params) 465 PHP_FE(mysqli_info, arginfo_mysqli_only_link) 466 PHP_FE(mysqli_insert_id, arginfo_mysqli_only_link) 467 PHP_FE(mysqli_kill, arginfo_mysqli_kill) 468 PHP_FE(mysqli_more_results, arginfo_mysqli_only_link) 469 PHP_FE(mysqli_multi_query, arginfo_mysqli_multi_query) 470 PHP_FE(mysqli_next_result, arginfo_mysqli_only_link) 471 PHP_FE(mysqli_num_fields, arginfo_mysqli_only_result) 472 PHP_FE(mysqli_num_rows, arginfo_mysqli_only_result) 473 PHP_FE(mysqli_options, arginfo_mysqli_options) 474 PHP_FE(mysqli_ping, arginfo_mysqli_only_link) 475 #if defined(MYSQLI_USE_MYSQLND) 476 PHP_FE(mysqli_poll, arginfo_mysqli_poll) 477 #endif 478 PHP_FE(mysqli_prepare, arginfo_mysqli_prepare) 479 PHP_FE(mysqli_report, arginfo_mysqli_report) 480 PHP_FE(mysqli_query, arginfo_mysqli_query) 481 PHP_FE(mysqli_real_connect, arginfo_mysqli_real_connect) 482 PHP_FE(mysqli_real_escape_string, arginfo_mysqli_real_escape_string) 483 PHP_FE(mysqli_real_query, arginfo_mysqli_real_query) 484 #if defined(MYSQLI_USE_MYSQLND) 485 PHP_FE(mysqli_reap_async_query, arginfo_mysqli_only_link) 486 #endif 487 PHP_FE(mysqli_release_savepoint, arginfo_mysqli_release_savepoint) 488 PHP_FE(mysqli_rollback, arginfo_mysqli_rollback) 489 PHP_FE(mysqli_savepoint, arginfo_mysqli_savepoint) 490 PHP_FE(mysqli_select_db, arginfo_mysqli_select_db) 491 #ifdef HAVE_MYSQLI_SET_CHARSET 492 PHP_FE(mysqli_set_charset, arginfo_mysqli_set_charset) 493 #endif 494 PHP_FE(mysqli_stmt_affected_rows, arginfo_mysqli_only_statement) 495 PHP_FE(mysqli_stmt_attr_get, arginfo_mysqli_stmt_attr_get) 496 PHP_FE(mysqli_stmt_attr_set, arginfo_mysqli_stmt_attr_set) 497 PHP_FE(mysqli_stmt_bind_param, arginfo_mysqli_stmt_bind_param) 498 PHP_FE(mysqli_stmt_bind_result, arginfo_mysqli_stmt_bind_result) 499 PHP_FE(mysqli_stmt_close, arginfo_mysqli_only_statement) 500 PHP_FE(mysqli_stmt_data_seek, arginfo_mysqli_stmt_data_seek) 501 PHP_FE(mysqli_stmt_errno, arginfo_mysqli_only_statement) 502 PHP_FE(mysqli_stmt_error, arginfo_mysqli_only_statement) 503 PHP_FE(mysqli_stmt_error_list, arginfo_mysqli_only_statement) 504 PHP_FE(mysqli_stmt_fetch, arginfo_mysqli_only_statement) 505 PHP_FE(mysqli_stmt_field_count, arginfo_mysqli_only_statement) 506 PHP_FE(mysqli_stmt_free_result, arginfo_mysqli_only_statement) 507 #if defined(MYSQLI_USE_MYSQLND) 508 PHP_FE(mysqli_stmt_get_result, arginfo_mysqli_only_statement) 509 #endif 510 PHP_FE(mysqli_stmt_get_warnings, arginfo_mysqli_only_statement) 511 PHP_FE(mysqli_stmt_init, arginfo_mysqli_only_link) 512 PHP_FE(mysqli_stmt_insert_id, arginfo_mysqli_only_statement) 513 #if defined(MYSQLI_USE_MYSQLND) 514 PHP_FE(mysqli_stmt_more_results, arginfo_mysqli_only_statement) 515 PHP_FE(mysqli_stmt_next_result, arginfo_mysqli_only_statement) 516 #endif 517 PHP_FE(mysqli_stmt_num_rows, arginfo_mysqli_only_statement) 518 PHP_FE(mysqli_stmt_param_count, arginfo_mysqli_only_statement) 519 PHP_FE(mysqli_stmt_prepare, arginfo_mysqli_stmt_prepare) 520 PHP_FE(mysqli_stmt_reset, arginfo_mysqli_only_statement) 521 PHP_FE(mysqli_stmt_result_metadata, arginfo_mysqli_only_statement) 522 PHP_FE(mysqli_stmt_send_long_data, arginfo_mysqli_stmt_send_long_data) 523 PHP_FE(mysqli_stmt_store_result, arginfo_mysqli_only_statement) 524 PHP_FE(mysqli_stmt_sqlstate, arginfo_mysqli_only_statement) 525 PHP_FE(mysqli_sqlstate, arginfo_mysqli_only_link) 526 PHP_FE(mysqli_ssl_set, arginfo_mysqli_ssl_set) 527 PHP_FE(mysqli_stat, arginfo_mysqli_only_link) 528 PHP_FE(mysqli_store_result, arginfo_mysqli_store_result) 529 PHP_FE(mysqli_thread_id, arginfo_mysqli_only_link) 530 PHP_FE(mysqli_thread_safe, arginfo_mysqli_no_params) 531 PHP_FE(mysqli_use_result, arginfo_mysqli_only_link) 532 PHP_FE(mysqli_warning_count, arginfo_mysqli_only_link) 533 534 PHP_FE(mysqli_refresh, arginfo_mysqli_refresh) 535 536 /* Aliases */ 537 PHP_FALIAS(mysqli_escape_string, mysqli_real_escape_string, arginfo_mysqli_query) 538 PHP_FALIAS(mysqli_set_opt, mysqli_options, NULL) 539 540 PHP_FE_END 541 }; 542 /* }}} */ 543 544 /* {{{ mysqli_link_methods[] 545 * 546 * Every user visible function must have an entry in mysqli_functions[]. 547 */ 548 const zend_function_entry mysqli_link_methods[] = { 549 PHP_FALIAS(autocommit, mysqli_autocommit, arginfo_class_mysqli_autocommit) 550 PHP_FALIAS(begin_transaction, mysqli_begin_transaction, arginfo_class_mysqli_begin_transaction) 551 PHP_FALIAS(change_user,mysqli_change_user, arginfo_class_mysqli_change_user) 552 PHP_FALIAS(character_set_name, mysqli_character_set_name, arginfo_mysqli_no_params) 553 PHP_FALIAS(close, mysqli_close, arginfo_mysqli_no_params) 554 PHP_FALIAS(commit, mysqli_commit, arginfo_class_mysqli_commit) 555 PHP_FALIAS(connect, mysqli_connect, arginfo_mysqli_connect) 556 PHP_FALIAS(dump_debug_info, mysqli_dump_debug_info, arginfo_mysqli_no_params) 557 PHP_FALIAS(debug, mysqli_debug, arginfo_mysqli_debug) 558 #ifdef HAVE_MYSQLI_GET_CHARSET 559 PHP_FALIAS(get_charset, mysqli_get_charset, arginfo_mysqli_no_params) 560 #endif 561 PHP_FALIAS(get_client_info, mysqli_get_client_info, arginfo_mysqli_no_params) 562 #if defined(MYSQLI_USE_MYSQLND) 563 PHP_FALIAS(get_connection_stats, mysqli_get_connection_stats, arginfo_mysqli_no_params) 564 #endif 565 PHP_FALIAS(get_server_info, mysqli_get_server_info, arginfo_mysqli_no_params) 566 PHP_FALIAS(get_warnings, mysqli_get_warnings, arginfo_mysqli_no_params) 567 PHP_FALIAS(init,mysqli_init_method, arginfo_mysqli_no_params) 568 PHP_FALIAS(kill,mysqli_kill, arginfo_class_mysqli_kill) 569 PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_multi_query) 570 PHP_FALIAS(__construct, mysqli_link_construct, arginfo_mysqli_connect) 571 PHP_FALIAS(more_results, mysqli_more_results, arginfo_mysqli_no_params) 572 PHP_FALIAS(next_result, mysqli_next_result, arginfo_mysqli_no_params) 573 PHP_FALIAS(options, mysqli_options, arginfo_class_mysqli_options) 574 PHP_FALIAS(ping, mysqli_ping, arginfo_mysqli_no_params) 575 #if defined(MYSQLI_USE_MYSQLND) 576 ZEND_FENTRY(poll, ZEND_FN(mysqli_poll), arginfo_mysqli_poll, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) 577 #endif 578 PHP_FALIAS(prepare, mysqli_prepare, arginfo_class_mysqli_prepare) 579 PHP_FALIAS(query, mysqli_query, arginfo_class_mysqli_query) 580 PHP_FALIAS(real_connect, mysqli_real_connect, arginfo_class_mysqli_real_connect) 581 PHP_FALIAS(real_escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string) 582 #if defined(MYSQLI_USE_MYSQLND) 583 PHP_FALIAS(reap_async_query, mysqli_reap_async_query, arginfo_mysqli_no_params) 584 #endif 585 PHP_FALIAS(escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string) 586 PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_real_query) 587 PHP_FALIAS(release_savepoint, mysqli_release_savepoint, arginfo_class_mysqli_release_savepoint) 588 PHP_FALIAS(rollback, mysqli_rollback, arginfo_class_mysqli_rollback) 589 PHP_FALIAS(savepoint, mysqli_savepoint, arginfo_class_mysqli_savepoint) 590 PHP_FALIAS(select_db,mysqli_select_db, arginfo_class_mysqli_select_db) 591 #ifdef HAVE_MYSQLI_SET_CHARSET 592 PHP_FALIAS(set_charset, mysqli_set_charset, arginfo_class_mysqli_set_charset) 593 #endif 594 PHP_FALIAS(set_opt, mysqli_options, arginfo_class_mysqli_options) 595 PHP_FALIAS(ssl_set, mysqli_ssl_set, arginfo_class_mysqli_ssl_set) 596 PHP_FALIAS(stat, mysqli_stat, arginfo_mysqli_no_params) 597 PHP_FALIAS(stmt_init, mysqli_stmt_init, arginfo_mysqli_no_params) 598 PHP_FALIAS(store_result, mysqli_store_result, arginfo_class_store_result) 599 PHP_FALIAS(thread_safe, mysqli_thread_safe, arginfo_mysqli_no_params) 600 PHP_FALIAS(use_result, mysqli_use_result, arginfo_mysqli_no_params) 601 PHP_FALIAS(refresh,mysqli_refresh, arginfo_class_mysqli_refresh) 602 PHP_FE_END 603 }; 604 /* }}} */ 605 606 /* {{{ mysqli_result_methods[] 607 * 608 * Every user visible function must have an entry in mysqli_result_functions[]. 609 */ 610 const zend_function_entry mysqli_result_methods[] = { 611 PHP_FALIAS(__construct, mysqli_result_construct, NULL) 612 PHP_FALIAS(close, mysqli_free_result, arginfo_mysqli_no_params) 613 PHP_FALIAS(free, mysqli_free_result, arginfo_mysqli_no_params) 614 PHP_FALIAS(data_seek, mysqli_data_seek, arginfo_class_mysqli_data_seek) 615 PHP_FALIAS(fetch_field, mysqli_fetch_field, arginfo_mysqli_no_params) 616 PHP_FALIAS(fetch_fields, mysqli_fetch_fields, arginfo_mysqli_no_params) 617 PHP_FALIAS(fetch_field_direct, mysqli_fetch_field_direct, arginfo_class_mysqli_result_and_fieldnr) 618 #if defined(MYSQLI_USE_MYSQLND) 619 PHP_FALIAS(fetch_all, mysqli_fetch_all, arginfo_class_mysqli_fetch_array) 620 #endif 621 PHP_FALIAS(fetch_array, mysqli_fetch_array, arginfo_class_mysqli_fetch_array) 622 PHP_FALIAS(fetch_assoc, mysqli_fetch_assoc, arginfo_mysqli_no_params) 623 PHP_FALIAS(fetch_object,mysqli_fetch_object, arginfo_class_mysqli_fetch_object) 624 PHP_FALIAS(fetch_row, mysqli_fetch_row, arginfo_mysqli_no_params) 625 PHP_FALIAS(field_seek, mysqli_field_seek, arginfo_class_mysqli_result_and_fieldnr) 626 PHP_FALIAS(free_result, mysqli_free_result, arginfo_mysqli_no_params) 627 PHP_FE_END 628 }; 629 /* }}} */ 630 631 /* {{{ mysqli_stmt_methods[] 632 * 633 * Every user visible function must have an entry in mysqli_stmt_functions[]. 634 */ 635 const zend_function_entry mysqli_stmt_methods[] = { 636 PHP_FALIAS(__construct, mysqli_stmt_construct, NULL) 637 PHP_FALIAS(attr_get, mysqli_stmt_attr_get, arginfo_class_mysqli_stmt_attr_get) 638 PHP_FALIAS(attr_set,mysqli_stmt_attr_set, arginfo_class_mysqli_stmt_attr_set) 639 PHP_FALIAS(bind_param,mysqli_stmt_bind_param, arginfo_class_mysqli_stmt_bind_param) 640 PHP_FALIAS(bind_result,mysqli_stmt_bind_result, arginfo_class_mysqli_stmt_bind_result) 641 PHP_FALIAS(close, mysqli_stmt_close, arginfo_mysqli_no_params) 642 PHP_FALIAS(data_seek, mysqli_stmt_data_seek, arginfo_class_mysqli_data_seek) 643 PHP_FALIAS(execute, mysqli_stmt_execute, arginfo_mysqli_no_params) 644 PHP_FALIAS(fetch, mysqli_stmt_fetch, arginfo_mysqli_no_params) 645 PHP_FALIAS(get_warnings, mysqli_stmt_get_warnings, arginfo_mysqli_no_params) 646 PHP_FALIAS(result_metadata, mysqli_stmt_result_metadata, arginfo_mysqli_no_params) 647 #if defined(MYSQLI_USE_MYSQLND) 648 PHP_FALIAS(more_results, mysqli_stmt_more_results, arginfo_mysqli_no_params) 649 PHP_FALIAS(next_result, mysqli_stmt_next_result, arginfo_mysqli_no_params) 650 #endif 651 PHP_FALIAS(num_rows, mysqli_stmt_num_rows, arginfo_mysqli_no_params) 652 PHP_FALIAS(send_long_data, mysqli_stmt_send_long_data, arginfo_class_mysqli_stmt_send_long_data) 653 PHP_FALIAS(free_result, mysqli_stmt_free_result, arginfo_mysqli_no_params) 654 PHP_FALIAS(reset, mysqli_stmt_reset, arginfo_mysqli_no_params) 655 PHP_FALIAS(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_prepare) 656 PHP_FALIAS(store_result, mysqli_stmt_store_result, arginfo_mysqli_no_params) 657 #if defined(MYSQLI_USE_MYSQLND) 658 PHP_FALIAS(get_result, mysqli_stmt_get_result, arginfo_mysqli_no_params) 659 #endif 660 PHP_FE_END 661 }; 662 /* }}} */ 663 664 /* 665 * Local variables: 666 * tab-width: 4 667 * c-basic-offset: 4 668 * End: 669 * vim600: noet sw=4 ts=4 fdm=marker 670 * vim<600: noet sw=4 ts=4 671 */ 672