From: Andrey Hristov Date: Wed, 7 Jul 2010 11:37:35 +0000 (+0000) Subject: arginfo for mysqli, was too fast to commit in trunk instead of one X-Git-Tag: php-5.3.3RC3~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce1bd65d29770dab63678926b4af99ef1515f383;p=php arginfo for mysqli, was too fast to commit in trunk instead of one directory up, thus the patch was split in two. --- diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index 0f9c9b6943..ebfcaef677 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -12,7 +12,9 @@ | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Author: Georg Richter | + | Authors: Georg Richter | + | Andrey Hristov | + | Ulf Wendel | +----------------------------------------------------------------------+ $Id$ @@ -29,13 +31,29 @@ #include "ext/standard/info.h" #include "php_mysqli_structs.h" +#if PHP_VERSION_ID >= 50399 +#define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_OBJ_INFO(0, link, mysqli, 0) +#define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) +#define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) +#else +#define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_INFO(0, link) +#define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_INFO(0, result) +#define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_INFO(0, stmt) +#endif -ZEND_BEGIN_ARG_INFO(second_arg_force_by_ref_rest, 1) +ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_result, 1) ZEND_ARG_PASS_INFO(0) ZEND_END_ARG_INFO(); -ZEND_BEGIN_ARG_INFO(third_arg_force_by_ref_rest, 1) +ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_param, 1) + ZEND_ARG_PASS_INFO(0) ZEND_ARG_PASS_INFO(0) +ZEND_END_ARG_INFO(); + +ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_result, 1) +ZEND_END_ARG_INFO(); + +ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_param, 1) ZEND_ARG_PASS_INFO(0) ZEND_END_ARG_INFO(); @@ -50,142 +68,401 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_poll, 0, 0, 4) ZEND_ARG_INFO(0, usec) ZEND_END_ARG_INFO(); +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_no_params, 0, 0, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_link, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_autocommit, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_change_user, 0, 0, 4) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_change_user, 0, 0, 3) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) +ZEND_END_ARG_INFO() + + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_connect, 0, 0, 0) + ZEND_ARG_INFO(0, host) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) + ZEND_ARG_INFO(0, port) + ZEND_ARG_INFO(0, socket) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_connect, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, host) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) + ZEND_ARG_INFO(0, port) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_connect, 0, 0, 0) + ZEND_ARG_INFO(0, host) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) + ZEND_ARG_INFO(0, port) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_result, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_statement, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_data_seek, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_data_seek, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_data_seek, 0, 0, 1) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_debug, 0, 0, 1) + ZEND_ARG_INFO(0, debug_options) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_result_and_fieldnr, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() + ZEND_ARG_INFO(0, field_nr) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_and_fieldnr, 0, 0, 1) + ZEND_ARG_INFO(0, field_nr) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_fetch_array, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() + ZEND_ARG_INFO(0, result_type) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_fetch_array, 0, 0, 0) + ZEND_ARG_INFO(0, result_type) +ZEND_END_ARG_INFO() + + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_fetch_object, 0, 0, 1) +#if PHP_VERSION_ID > 50399 + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() + ZEND_ARG_INFO(0, class_name) + ZEND_ARG_ARRAY_INFO(0, params, 0) +#endif +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_fetch_object, 0, 0, 0) +#if PHP_VERSION_ID > 50399 + ZEND_ARG_INFO(0, class_name) + ZEND_ARG_ARRAY_INFO(0, params, 0) +#endif +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_kill, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, connection_id) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_kill, 0, 0, 1) + ZEND_ARG_INFO(0, connection_id) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_set_local_infile_handler, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, read_callback) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_local_infile_handler, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, read_callback) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_query, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, query) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_prepare, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, query) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_prepare, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, query) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_query, 0, 0, 1) + ZEND_ARG_INFO(0, query) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_options, 0, 0, 3) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, option) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_options, 0, 0, 2) + ZEND_ARG_INFO(0, option) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_report, 0, 0, 1) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_escape_string, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, string_to_escape) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_escape_string, 0, 0, 1) + ZEND_ARG_INFO(0, string_to_escape) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_select_db, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, database) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_select_db, 0, 0, 1) + ZEND_ARG_INFO(0, database) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_set_charset, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, charset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_charset, 0, 0, 1) + ZEND_ARG_INFO(0, charset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_attr_get, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, attribute) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_get, 0, 0, 1) + ZEND_ARG_INFO(0, attribute) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_attr_set, 0, 0, 3) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, attribute) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_set, 0, 0, 2) + ZEND_ARG_INFO(0, attribute) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_send_long_data, 0, 0, 3) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, param_nr) + ZEND_ARG_INFO(0, data) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_send_long_data, 0, 0, 2) + ZEND_ARG_INFO(0, param_nr) + ZEND_ARG_INFO(0, data) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_ssl_set, 0, 0, 6) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, key) + ZEND_ARG_INFO(0, cert) + ZEND_ARG_INFO(0, certificate_authority) + ZEND_ARG_INFO(0, certificate_authority_path) + ZEND_ARG_INFO(0, cipher) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5) + ZEND_ARG_INFO(0, key) + ZEND_ARG_INFO(0, cert) + ZEND_ARG_INFO(0, certificate_authority) + ZEND_ARG_INFO(0, certificate_authority_path) + ZEND_ARG_INFO(0, cipher) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_refresh, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, options) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1) + ZEND_ARG_INFO(0, options) +ZEND_END_ARG_INFO() + + /* {{{ mysqli_functions[] * * Every user visible function must have an entry in mysqli_functions[]. */ const zend_function_entry mysqli_functions[] = { - PHP_FE(mysqli_affected_rows, NULL) - PHP_FE(mysqli_autocommit, NULL) - PHP_FE(mysqli_change_user, NULL) - PHP_FE(mysqli_character_set_name, NULL) - PHP_FE(mysqli_close, NULL) - PHP_FE(mysqli_commit, NULL) - PHP_FE(mysqli_connect, NULL) - PHP_FE(mysqli_connect_errno, NULL) - PHP_FE(mysqli_connect_error, NULL) - PHP_FE(mysqli_data_seek, NULL) - PHP_FE(mysqli_dump_debug_info, NULL) - PHP_FE(mysqli_debug, NULL) + PHP_FE(mysqli_affected_rows, arginfo_mysqli_only_link) + PHP_FE(mysqli_autocommit, arginfo_mysqli_autocommit) + PHP_FE(mysqli_change_user, arginfo_mysqli_change_user) + PHP_FE(mysqli_character_set_name, arginfo_mysqli_only_link) + PHP_FE(mysqli_close, arginfo_mysqli_only_link) + PHP_FE(mysqli_commit, arginfo_mysqli_only_link) + PHP_FE(mysqli_connect, arginfo_mysqli_connect) + PHP_FE(mysqli_connect_errno, arginfo_mysqli_no_params) + PHP_FE(mysqli_connect_error, arginfo_mysqli_no_params) + PHP_FE(mysqli_data_seek, arginfo_mysqli_data_seek) + PHP_FE(mysqli_dump_debug_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_debug, arginfo_mysqli_debug) #if defined(HAVE_EMBEDDED_MYSQLI) PHP_FE(mysqli_embedded_server_end, NULL) PHP_FE(mysqli_embedded_server_start, NULL) #endif - PHP_FE(mysqli_errno, NULL) - PHP_FE(mysqli_error, NULL) - PHP_FE(mysqli_stmt_execute, NULL) - PHP_FALIAS(mysqli_execute, mysqli_stmt_execute, NULL) - PHP_FE(mysqli_fetch_field, NULL) - PHP_FE(mysqli_fetch_fields, NULL) - PHP_FE(mysqli_fetch_field_direct, NULL) - PHP_FE(mysqli_fetch_lengths, NULL) + PHP_FE(mysqli_errno, arginfo_mysqli_only_link) + PHP_FE(mysqli_error, arginfo_mysqli_only_link) + PHP_FE(mysqli_stmt_execute, arginfo_mysqli_only_statement) + PHP_FALIAS(mysqli_execute, mysqli_stmt_execute, arginfo_mysqli_only_statement) + PHP_FE(mysqli_fetch_field, arginfo_mysqli_only_result) + PHP_FE(mysqli_fetch_fields, arginfo_mysqli_only_result) + PHP_FE(mysqli_fetch_field_direct, arginfo_mysqli_result_and_fieldnr) + PHP_FE(mysqli_fetch_lengths, arginfo_mysqli_only_result) #ifdef MYSQLI_USE_MYSQLND - PHP_FE(mysqli_fetch_all, NULL) + PHP_FE(mysqli_fetch_all, arginfo_mysqli_only_result) #endif - PHP_FE(mysqli_fetch_array, NULL) - PHP_FE(mysqli_fetch_assoc, NULL) - PHP_FE(mysqli_fetch_object, NULL) - PHP_FE(mysqli_fetch_row, NULL) - PHP_FE(mysqli_field_count, NULL) - PHP_FE(mysqli_field_seek, NULL) - PHP_FE(mysqli_field_tell, NULL) - PHP_FE(mysqli_free_result, NULL) + PHP_FE(mysqli_fetch_array, arginfo_mysqli_fetch_array) + PHP_FE(mysqli_fetch_assoc, arginfo_mysqli_only_result) + PHP_FE(mysqli_fetch_object, arginfo_mysqli_fetch_object) + PHP_FE(mysqli_fetch_row, arginfo_mysqli_only_result) + PHP_FE(mysqli_field_count, arginfo_mysqli_only_link) + PHP_FE(mysqli_field_seek, arginfo_mysqli_result_and_fieldnr) + PHP_FE(mysqli_field_tell, arginfo_mysqli_only_result) + PHP_FE(mysqli_free_result, arginfo_mysqli_only_result) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_get_cache_stats, NULL) - PHP_FE(mysqli_get_connection_stats, NULL) - PHP_FE(mysqli_get_client_stats, NULL) + PHP_FE(mysqli_get_cache_stats, arginfo_mysqli_no_params) + PHP_FE(mysqli_get_connection_stats, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_client_stats, arginfo_mysqli_no_params) #endif #ifdef HAVE_MYSQLI_GET_CHARSET - PHP_FE(mysqli_get_charset, NULL) + PHP_FE(mysqli_get_charset, arginfo_mysqli_only_link) #endif - PHP_FE(mysqli_get_client_info, NULL) - PHP_FE(mysqli_get_client_version, NULL) - PHP_FE(mysqli_get_host_info, NULL) - PHP_FE(mysqli_get_proto_info, NULL) - PHP_FE(mysqli_get_server_info, NULL) - PHP_FE(mysqli_get_server_version, NULL) - PHP_FE(mysqli_get_warnings, NULL) - PHP_FE(mysqli_init, NULL) - PHP_FE(mysqli_info, NULL) - PHP_FE(mysqli_insert_id, NULL) - PHP_FE(mysqli_kill, NULL) + PHP_FE(mysqli_get_client_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_client_version, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_host_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_proto_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_server_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_server_version, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_warnings, arginfo_mysqli_only_link) + PHP_FE(mysqli_init, arginfo_mysqli_no_params) + PHP_FE(mysqli_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_insert_id, arginfo_mysqli_only_link) + PHP_FE(mysqli_kill, arginfo_mysqli_kill) #if !defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_set_local_infile_default, NULL) - PHP_FE(mysqli_set_local_infile_handler, NULL) + PHP_FE(mysqli_set_local_infile_default, arginfo_mysqli_only_link) + PHP_FE(mysqli_set_local_infile_handler, arginfo_mysqli_set_local_infile_handler) #endif - PHP_FE(mysqli_more_results, NULL) - PHP_FE(mysqli_multi_query, NULL) - PHP_FE(mysqli_next_result, NULL) - PHP_FE(mysqli_num_fields, NULL) - PHP_FE(mysqli_num_rows, NULL) - PHP_FE(mysqli_options, NULL) - PHP_FE(mysqli_ping, NULL) + PHP_FE(mysqli_more_results, arginfo_mysqli_only_link) + PHP_FE(mysqli_multi_query, arginfo_mysqli_query) + PHP_FE(mysqli_next_result, arginfo_mysqli_only_link) + PHP_FE(mysqli_num_fields, arginfo_mysqli_only_result) + PHP_FE(mysqli_num_rows, arginfo_mysqli_only_result) + PHP_FE(mysqli_options, arginfo_mysqli_options) + PHP_FE(mysqli_ping, arginfo_mysqli_only_link) #if defined(MYSQLI_USE_MYSQLND) PHP_FE(mysqli_poll, arginfo_mysqli_poll) #endif - PHP_FE(mysqli_prepare, NULL) - PHP_FE(mysqli_report, NULL) - PHP_FE(mysqli_query, NULL) - PHP_FE(mysqli_real_connect, NULL) - PHP_FE(mysqli_real_escape_string, NULL) - PHP_FE(mysqli_real_query, NULL) + PHP_FE(mysqli_prepare, arginfo_mysqli_prepare) + PHP_FE(mysqli_report, arginfo_mysqli_report) + PHP_FE(mysqli_query, arginfo_mysqli_query) + PHP_FE(mysqli_real_connect, arginfo_mysqli_real_connect) + PHP_FE(mysqli_real_escape_string, arginfo_mysqli_real_escape_string) + PHP_FE(mysqli_real_query, arginfo_mysqli_query) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_reap_async_query, NULL) + PHP_FE(mysqli_reap_async_query, arginfo_mysqli_only_link) #endif - PHP_FE(mysqli_rollback, NULL) - PHP_FE(mysqli_select_db, NULL) + PHP_FE(mysqli_rollback, arginfo_mysqli_only_link) + PHP_FE(mysqli_select_db, arginfo_mysqli_select_db) #ifdef HAVE_MYSQLI_SET_CHARSET - PHP_FE(mysqli_set_charset, NULL) + PHP_FE(mysqli_set_charset, arginfo_mysqli_set_charset) #endif - PHP_FE(mysqli_stmt_attr_get, NULL) - PHP_FE(mysqli_stmt_attr_set, NULL) - PHP_FE(mysqli_stmt_field_count, NULL) - PHP_FE(mysqli_stmt_init, NULL) - PHP_FE(mysqli_stmt_prepare, NULL) - PHP_FE(mysqli_stmt_result_metadata, NULL) - PHP_FE(mysqli_stmt_send_long_data, NULL) - PHP_FE(mysqli_stmt_bind_param, third_arg_force_by_ref_rest) - PHP_FE(mysqli_stmt_bind_result, second_arg_force_by_ref_rest) - PHP_FE(mysqli_stmt_fetch, NULL) - PHP_FE(mysqli_stmt_free_result, NULL) + PHP_FE(mysqli_stmt_affected_rows, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_attr_get, arginfo_mysqli_stmt_attr_get) + PHP_FE(mysqli_stmt_attr_set, arginfo_mysqli_stmt_attr_set) + PHP_FE(mysqli_stmt_bind_param, arginfo_mysqli_stmt_bind_param) + PHP_FE(mysqli_stmt_bind_result, arginfo_mysqli_stmt_bind_result) + PHP_FE(mysqli_stmt_close, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_data_seek, arginfo_mysqli_stmt_data_seek) + PHP_FE(mysqli_stmt_errno, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_error, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_fetch, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_field_count, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_free_result, arginfo_mysqli_only_statement) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_stmt_get_result, NULL) + PHP_FE(mysqli_stmt_get_result, arginfo_mysqli_only_statement) #endif - PHP_FE(mysqli_stmt_get_warnings, NULL) - PHP_FE(mysqli_stmt_insert_id, NULL) - PHP_FE(mysqli_stmt_reset, NULL) - PHP_FE(mysqli_stmt_param_count, NULL) - PHP_FE(mysqli_sqlstate, NULL) - PHP_FE(mysqli_ssl_set, NULL) - PHP_FE(mysqli_stat, NULL) - PHP_FE(mysqli_stmt_affected_rows, NULL) - PHP_FE(mysqli_stmt_close, NULL) - PHP_FE(mysqli_stmt_data_seek, NULL) - PHP_FE(mysqli_stmt_errno, NULL) - PHP_FE(mysqli_stmt_error, NULL) + PHP_FE(mysqli_stmt_get_warnings, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_init, arginfo_mysqli_only_link) + PHP_FE(mysqli_stmt_insert_id, arginfo_mysqli_only_statement) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_stmt_more_results, NULL) - PHP_FE(mysqli_stmt_next_result, NULL) + PHP_FE(mysqli_stmt_more_results, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_next_result, arginfo_mysqli_only_statement) #endif - PHP_FE(mysqli_stmt_num_rows, NULL) - PHP_FE(mysqli_stmt_sqlstate, NULL) - PHP_FE(mysqli_stmt_store_result, NULL) - PHP_FE(mysqli_store_result, NULL) - PHP_FE(mysqli_thread_id, NULL) - PHP_FE(mysqli_thread_safe, NULL) - PHP_FE(mysqli_use_result, NULL) - PHP_FE(mysqli_warning_count, NULL) + PHP_FE(mysqli_stmt_num_rows, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_param_count, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_prepare, arginfo_mysqli_stmt_prepare) + PHP_FE(mysqli_stmt_reset, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_result_metadata, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_send_long_data, arginfo_mysqli_stmt_send_long_data) + PHP_FE(mysqli_stmt_store_result, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_sqlstate, arginfo_mysqli_only_statement) + PHP_FE(mysqli_sqlstate, arginfo_mysqli_only_link) + PHP_FE(mysqli_ssl_set, arginfo_mysqli_ssl_set) + PHP_FE(mysqli_stat, arginfo_mysqli_only_link) + PHP_FE(mysqli_store_result, arginfo_mysqli_only_link) + PHP_FE(mysqli_thread_id, arginfo_mysqli_only_link) + PHP_FE(mysqli_thread_safe, arginfo_mysqli_no_params) + PHP_FE(mysqli_use_result, arginfo_mysqli_only_link) + PHP_FE(mysqli_warning_count, arginfo_mysqli_only_link) - PHP_FE(mysqli_refresh, NULL) + PHP_FE(mysqli_refresh, arginfo_mysqli_refresh) /* Aliases */ - PHP_FALIAS(mysqli_bind_param, mysqli_stmt_bind_param, third_arg_force_by_ref_rest) - PHP_FALIAS(mysqli_bind_result, mysqli_stmt_bind_result, second_arg_force_by_ref_rest) + PHP_FALIAS(mysqli_bind_param, mysqli_stmt_bind_param, arginfo_mysqli_stmt_bind_param) + PHP_FALIAS(mysqli_bind_result, mysqli_stmt_bind_result, arginfo_mysqli_stmt_bind_result) PHP_FALIAS(mysqli_client_encoding, mysqli_character_set_name, NULL) - PHP_FALIAS(mysqli_escape_string, mysqli_real_escape_string, NULL) + PHP_FALIAS(mysqli_escape_string, mysqli_real_escape_string, arginfo_mysqli_query) PHP_FALIAS(mysqli_fetch, mysqli_stmt_fetch, NULL) PHP_FALIAS(mysqli_param_count, mysqli_stmt_param_count, NULL) - PHP_FALIAS(mysqli_get_metadata, mysqli_stmt_result_metadata, NULL) + PHP_FALIAS(mysqli_get_metadata, mysqli_stmt_result_metadata,NULL) PHP_FALIAS(mysqli_send_long_data, mysqli_stmt_send_long_data, NULL) PHP_FALIAS(mysqli_set_opt, mysqli_options, NULL) @@ -198,59 +475,58 @@ const zend_function_entry mysqli_functions[] = { * Every user visible function must have an entry in mysqli_functions[]. */ const zend_function_entry mysqli_link_methods[] = { - PHP_FALIAS(autocommit,mysqli_autocommit,NULL) - PHP_FALIAS(change_user,mysqli_change_user,NULL) - PHP_FALIAS(character_set_name, mysqli_character_set_name,NULL) - PHP_FALIAS(client_encoding, mysqli_character_set_name,NULL) - PHP_FALIAS(close,mysqli_close,NULL) - PHP_FALIAS(commit,mysqli_commit,NULL) - PHP_FALIAS(connect,mysqli_connect,NULL) - PHP_FALIAS(dump_debug_info,mysqli_dump_debug_info,NULL) - PHP_FALIAS(debug,mysqli_debug,NULL) + PHP_FALIAS(autocommit, mysqli_autocommit, arginfo_class_mysqli_autocommit) + PHP_FALIAS(change_user,mysqli_change_user, arginfo_class_mysqli_change_user) + PHP_FALIAS(character_set_name, mysqli_character_set_name, arginfo_mysqli_no_params) + PHP_FALIAS(client_encoding, mysqli_character_set_name, arginfo_mysqli_no_params) /* deprecated */ + PHP_FALIAS(close, mysqli_close, arginfo_mysqli_no_params) + PHP_FALIAS(commit, mysqli_commit, arginfo_mysqli_no_params) + PHP_FALIAS(connect, mysqli_connect, arginfo_mysqli_connect) + PHP_FALIAS(dump_debug_info, mysqli_dump_debug_info, arginfo_mysqli_no_params) + PHP_FALIAS(debug, mysqli_debug, arginfo_mysqli_debug) #ifdef HAVE_MYSQLI_GET_CHARSET - PHP_FALIAS(get_charset,mysqli_get_charset,NULL) + PHP_FALIAS(get_charset, mysqli_get_charset, arginfo_mysqli_no_params) #endif - PHP_FALIAS(get_client_info,mysqli_get_client_info,NULL) + PHP_FALIAS(get_client_info, mysqli_get_client_info, arginfo_mysqli_no_params) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(get_connection_stats,mysqli_get_connection_stats,NULL) + PHP_FALIAS(get_connection_stats, mysqli_get_connection_stats, arginfo_mysqli_no_params) #endif - PHP_FALIAS(get_server_info,mysqli_get_server_info,NULL) - PHP_FALIAS(get_warnings, mysqli_get_warnings, NULL) - PHP_FALIAS(init,mysqli_init,NULL) - PHP_FALIAS(kill,mysqli_kill,NULL) + PHP_FALIAS(get_server_info, mysqli_get_server_info, arginfo_mysqli_no_params) + PHP_FALIAS(get_warnings, mysqli_get_warnings, arginfo_mysqli_no_params) + PHP_FALIAS(init,mysqli_init, arginfo_mysqli_no_params) + PHP_FALIAS(kill,mysqli_kill, arginfo_class_mysqli_kill) #if !defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(set_local_infile_default,mysqli_set_local_infile_default,NULL) - PHP_FALIAS(set_local_infile_handler,mysqli_set_local_infile_handler,NULL) + PHP_FALIAS(set_local_infile_default, mysqli_set_local_infile_default, arginfo_mysqli_no_params) + PHP_FALIAS(set_local_infile_handler, mysqli_set_local_infile_handler, arginfo_class_mysqli_set_local_infile_handler) #endif - PHP_FALIAS(multi_query,mysqli_multi_query,NULL) - PHP_FALIAS(mysqli,mysqli_link_construct,NULL) - PHP_FALIAS(more_results,mysqli_more_results, NULL) - PHP_FALIAS(next_result, mysqli_next_result, NULL) - PHP_FALIAS(options,mysqli_options,NULL) - PHP_FALIAS(ping,mysqli_ping,NULL) - PHP_FALIAS(prepare,mysqli_prepare,NULL) - PHP_FALIAS(query,mysqli_query,NULL) - PHP_FALIAS(real_connect,mysqli_real_connect,NULL) - PHP_FALIAS(real_escape_string,mysqli_real_escape_string,NULL) + PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_query) + PHP_FALIAS(mysqli, mysqli_link_construct, arginfo_mysqli_connect) + PHP_FALIAS(more_results, mysqli_more_results, arginfo_mysqli_no_params) + PHP_FALIAS(next_result, mysqli_next_result, arginfo_mysqli_no_params) + PHP_FALIAS(options, mysqli_options, arginfo_class_mysqli_options) + PHP_FALIAS(ping, mysqli_ping, arginfo_mysqli_no_params) + PHP_FALIAS(prepare, mysqli_prepare, arginfo_class_mysqli_query) + PHP_FALIAS(query, mysqli_query, arginfo_class_mysqli_query) + PHP_FALIAS(real_connect, mysqli_real_connect, arginfo_class_mysqli_real_connect) + PHP_FALIAS(real_escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(poll,mysqli_poll,NULL) - PHP_FALIAS(reap_async_query,mysqli_reap_async_query,NULL) + PHP_FALIAS(reap_async_query, mysqli_reap_async_query, arginfo_mysqli_no_params) #endif - PHP_FALIAS(escape_string, mysqli_real_escape_string,NULL) - PHP_FALIAS(real_query,mysqli_real_query,NULL) - PHP_FALIAS(rollback,mysqli_rollback,NULL) - PHP_FALIAS(select_db,mysqli_select_db,NULL) + PHP_FALIAS(escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string) + PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_query) + PHP_FALIAS(rollback,mysqli_rollback, arginfo_mysqli_no_params) + PHP_FALIAS(select_db,mysqli_select_db, arginfo_class_mysqli_select_db) #ifdef HAVE_MYSQLI_SET_CHARSET - PHP_FALIAS(set_charset,mysqli_set_charset,NULL) + PHP_FALIAS(set_charset, mysqli_set_charset, arginfo_class_mysqli_set_charset) #endif - PHP_FALIAS(set_opt, mysqli_options,NULL) - PHP_FALIAS(ssl_set,mysqli_ssl_set,NULL) - PHP_FALIAS(stat,mysqli_stat,NULL) - PHP_FALIAS(stmt_init,mysqli_stmt_init, NULL) - PHP_FALIAS(store_result,mysqli_store_result,NULL) - PHP_FALIAS(thread_safe,mysqli_thread_safe,NULL) - PHP_FALIAS(use_result,mysqli_use_result,NULL) - PHP_FALIAS(refresh,mysqli_refresh,NULL) + PHP_FALIAS(set_opt, mysqli_options, arginfo_class_mysqli_options) + PHP_FALIAS(ssl_set, mysqli_ssl_set, arginfo_class_mysqli_ssl_set) + PHP_FALIAS(stat, mysqli_stat, arginfo_mysqli_no_params) + PHP_FALIAS(stmt_init, mysqli_stmt_init, arginfo_mysqli_no_params) + PHP_FALIAS(store_result, mysqli_store_result, arginfo_mysqli_no_params) + PHP_FALIAS(thread_safe, mysqli_thread_safe, arginfo_mysqli_no_params) + PHP_FALIAS(use_result, mysqli_use_result, arginfo_mysqli_no_params) + PHP_FALIAS(refresh,mysqli_refresh, arginfo_class_mysqli_refresh) {NULL, NULL, NULL} }; /* }}} */ @@ -261,21 +537,21 @@ const zend_function_entry mysqli_link_methods[] = { */ const zend_function_entry mysqli_result_methods[] = { PHP_FALIAS(__construct, mysqli_result_construct, NULL) - PHP_FALIAS(close,mysqli_free_result,NULL) - PHP_FALIAS(free,mysqli_free_result,NULL) - PHP_FALIAS(data_seek,mysqli_data_seek,NULL) - PHP_FALIAS(fetch_field,mysqli_fetch_field,NULL) - PHP_FALIAS(fetch_fields,mysqli_fetch_fields,NULL) - PHP_FALIAS(fetch_field_direct,mysqli_fetch_field_direct,NULL) + PHP_FALIAS(close, mysqli_free_result, arginfo_mysqli_no_params) + PHP_FALIAS(free, mysqli_free_result, arginfo_mysqli_no_params) + PHP_FALIAS(data_seek, mysqli_data_seek, arginfo_class_mysqli_data_seek) + PHP_FALIAS(fetch_field, mysqli_fetch_field, arginfo_mysqli_no_params) + PHP_FALIAS(fetch_fields, mysqli_fetch_fields, arginfo_mysqli_no_params) + PHP_FALIAS(fetch_field_direct, mysqli_fetch_field_direct, arginfo_class_mysqli_result_and_fieldnr) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(fetch_all,mysqli_fetch_all,NULL) + PHP_FALIAS(fetch_all, mysqli_fetch_all, arginfo_mysqli_no_params) #endif - PHP_FALIAS(fetch_array,mysqli_fetch_array,NULL) - PHP_FALIAS(fetch_assoc,mysqli_fetch_assoc,NULL) - PHP_FALIAS(fetch_object,mysqli_fetch_object,NULL) - PHP_FALIAS(fetch_row,mysqli_fetch_row,NULL) - PHP_FALIAS(field_seek,mysqli_field_seek,NULL) - PHP_FALIAS(free_result,mysqli_free_result,NULL) + PHP_FALIAS(fetch_array, mysqli_fetch_array, arginfo_class_mysqli_fetch_array) + PHP_FALIAS(fetch_assoc, mysqli_fetch_assoc, arginfo_mysqli_no_params) + PHP_FALIAS(fetch_object,mysqli_fetch_object, arginfo_class_mysqli_fetch_object) + PHP_FALIAS(fetch_row, mysqli_fetch_row, arginfo_mysqli_no_params) + PHP_FALIAS(field_seek, mysqli_field_seek, arginfo_class_mysqli_result_and_fieldnr) + PHP_FALIAS(free_result, mysqli_free_result, arginfo_mysqli_no_params) {NULL, NULL, NULL} }; /* }}} */ @@ -286,29 +562,28 @@ const zend_function_entry mysqli_result_methods[] = { */ const zend_function_entry mysqli_stmt_methods[] = { PHP_FALIAS(__construct, mysqli_stmt_construct, NULL) - PHP_FALIAS(attr_get,mysqli_stmt_attr_get,NULL) - PHP_FALIAS(attr_set,mysqli_stmt_attr_set,NULL) - PHP_FALIAS(bind_param,mysqli_stmt_bind_param,second_arg_force_by_ref_rest) - PHP_FALIAS(bind_result,mysqli_stmt_bind_result,all_args_force_by_ref) - PHP_FALIAS(close,mysqli_stmt_close,NULL) - PHP_FALIAS(data_seek,mysqli_stmt_data_seek,NULL) - PHP_FALIAS(execute,mysqli_stmt_execute,NULL) - PHP_FALIAS(fetch,mysqli_stmt_fetch,NULL) - PHP_FALIAS(get_warnings, mysqli_stmt_get_warnings, NULL) - PHP_FALIAS(result_metadata, mysqli_stmt_result_metadata,NULL) + PHP_FALIAS(attr_get, mysqli_stmt_attr_get, arginfo_class_mysqli_stmt_attr_get) + PHP_FALIAS(attr_set,mysqli_stmt_attr_set, arginfo_class_mysqli_stmt_attr_set) + PHP_FALIAS(bind_param,mysqli_stmt_bind_param, arginfo_class_mysqli_stmt_bind_param) + PHP_FALIAS(bind_result,mysqli_stmt_bind_result, arginfo_class_mysqli_stmt_bind_result) + PHP_FALIAS(close, mysqli_stmt_close, arginfo_mysqli_no_params) + PHP_FALIAS(data_seek, mysqli_stmt_data_seek, arginfo_class_mysqli_data_seek) + PHP_FALIAS(execute, mysqli_stmt_execute, arginfo_mysqli_no_params) + PHP_FALIAS(fetch, mysqli_stmt_fetch, arginfo_mysqli_no_params) + PHP_FALIAS(get_warnings, mysqli_stmt_get_warnings, arginfo_mysqli_no_params) + PHP_FALIAS(result_metadata, mysqli_stmt_result_metadata, arginfo_mysqli_no_params) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(more_results, mysqli_stmt_more_results,NULL) - PHP_FALIAS(next_result, mysqli_stmt_next_result,NULL) + PHP_FALIAS(more_results, mysqli_stmt_more_results, arginfo_mysqli_no_params) + PHP_FALIAS(next_result, mysqli_stmt_next_result, arginfo_mysqli_no_params) #endif - PHP_FALIAS(num_rows, mysqli_stmt_num_rows,NULL) - PHP_FALIAS(send_long_data,mysqli_stmt_send_long_data,NULL) - PHP_FALIAS(stmt,mysqli_prepare,NULL) - PHP_FALIAS(free_result,mysqli_stmt_free_result,NULL) - PHP_FALIAS(reset,mysqli_stmt_reset,NULL) - PHP_FALIAS(prepare,mysqli_stmt_prepare, NULL) - PHP_FALIAS(store_result,mysqli_stmt_store_result,NULL) + PHP_FALIAS(num_rows, mysqli_stmt_num_rows, arginfo_mysqli_no_params) + PHP_FALIAS(send_long_data, mysqli_stmt_send_long_data, arginfo_class_mysqli_stmt_send_long_data) + PHP_FALIAS(free_result, mysqli_stmt_free_result, arginfo_mysqli_no_params) + PHP_FALIAS(reset, mysqli_stmt_reset, arginfo_mysqli_no_params) + PHP_FALIAS(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_query) + PHP_FALIAS(store_result, mysqli_stmt_store_result, arginfo_mysqli_no_params) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(get_result,mysqli_stmt_get_result,NULL) + PHP_FALIAS(get_result, mysqli_stmt_get_result, arginfo_mysqli_no_params) #endif {NULL, NULL, NULL} }; diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt index 50c66d4f4d..c94b39ddac 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt @@ -62,7 +62,6 @@ require_once('skipifconnectfailure.inc'); /* $expected_methods['get_cache_stats'] = true; */ /* $expected_methods['get_client_stats'] = true; */ $expected_methods['get_connection_stats'] = true; - $expected_methods['poll'] = true; $expected_methods['reap_async_query'] = true; } else { // libmysql only diff --git a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt index ebe7a0285d..910ede93c6 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt @@ -52,9 +52,51 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 8448 -Number of Parameters: 0 +Number of Parameters: 6 Number of Required Parameters: 0 +Inspecting parameter 'host' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'user' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'port' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'socket' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + Inspecting method 'autocommit' isFinal: no isAbstract: no @@ -68,8 +110,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'mode' of method 'autocommit' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'change_user' isFinal: no @@ -84,8 +133,29 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 3 +Number of Required Parameters: 3 + +Inspecting parameter 'user' of method 'change_user' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'change_user' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'change_user' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'character_set_name' isFinal: no @@ -164,9 +234,51 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 +Number of Parameters: 6 Number of Required Parameters: 0 +Inspecting parameter 'host' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'user' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'port' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'socket' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + Inspecting method 'debug' isFinal: no isAbstract: no @@ -180,8 +292,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'debug_options' of method 'debug' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'dump_debug_info' isFinal: no @@ -212,8 +331,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'string_to_escape' of method 'escape_string' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'get_charset' isFinal: no @@ -324,8 +450,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'connection_id' of method 'kill' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'more_results' isFinal: no @@ -356,8 +489,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'query' of method 'multi_query' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'mysqli' isFinal: no @@ -372,9 +512,51 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 8448 -Number of Parameters: 0 +Number of Parameters: 6 Number of Required Parameters: 0 +Inspecting parameter 'host' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'user' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'port' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'socket' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + Inspecting method 'next_result' isFinal: no isAbstract: no @@ -404,26 +586,24 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 2 +Number of Required Parameters: 2 -Inspecting method 'ping' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Inspecting parameter 'option' of method 'options' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'value' of method 'options' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no -Inspecting method 'poll' +Inspecting method 'ping' isFinal: no isAbstract: no isPublic: yes @@ -452,8 +632,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'query' of method 'prepare' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'query' isFinal: no @@ -468,8 +655,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'query' of method 'query' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'real_connect' isFinal: no @@ -484,9 +678,58 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 +Number of Parameters: 7 Number of Required Parameters: 0 +Inspecting parameter 'host' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'user' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'port' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'socket' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'flags' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + Inspecting method 'real_escape_string' isFinal: no isAbstract: no @@ -500,8 +743,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'string_to_escape' of method 'real_escape_string' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'real_query' isFinal: no @@ -516,8 +766,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'query' of method 'real_query' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'reap_async_query' isFinal: no @@ -548,8 +805,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'options' of method 'refresh' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'rollback' isFinal: no @@ -580,8 +844,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'database' of method 'select_db' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'set_charset' isFinal: no @@ -596,8 +867,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'charset' of method 'set_charset' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'set_opt' isFinal: no @@ -612,8 +890,22 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 2 +Number of Required Parameters: 2 + +Inspecting parameter 'option' of method 'set_opt' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'value' of method 'set_opt' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'ssl_set' isFinal: no @@ -628,8 +920,43 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 5 +Number of Required Parameters: 5 + +Inspecting parameter 'key' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'cert' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'certificate_authority' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'certificate_authority_path' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'cipher' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'stat' isFinal: no diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt index cf59732497..b86129c57e 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt @@ -52,7 +52,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 8448 Number of Parameters: 0 Number of Required Parameters: 0 @@ -68,7 +68,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 8448 Number of Parameters: 0 Number of Required Parameters: 0 @@ -84,7 +84,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -100,9 +100,16 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d -Number of Parameters: 0 -Number of Required Parameters: 0 +Modifiers: 256 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'offset' of method 'data_seek' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'fetch_all' isFinal: no @@ -116,7 +123,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -132,10 +139,17 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d -Number of Parameters: 0 +Modifiers: 256 +Number of Parameters: 1 Number of Required Parameters: 0 +Inspecting parameter 'result_type' of method 'fetch_array' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + Inspecting method 'fetch_assoc' isFinal: no isAbstract: no @@ -148,7 +162,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -164,7 +178,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -180,9 +194,16 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d -Number of Parameters: 0 -Number of Required Parameters: 0 +Modifiers: 256 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'field_nr' of method 'fetch_field_direct' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'fetch_fields' isFinal: no @@ -196,7 +217,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -212,7 +233,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -228,7 +249,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -244,9 +265,16 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d -Number of Parameters: 0 -Number of Required Parameters: 0 +Modifiers: 256 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'field_nr' of method 'field_seek' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'free' isFinal: no @@ -260,7 +288,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -276,7 +304,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -324,4 +352,4 @@ Default property 'field_count' Default property 'lengths' Default property 'num_rows' Default property 'type' -done! +done! \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt index 9ddb26e89e..7cbb127212 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt @@ -37,7 +37,6 @@ Interface of the class mysqli_stmt 'reset' => true, 'result_metadata' => true, 'send_long_data' => true, - 'stmt' => true, 'store_result' => true, ); diff --git a/ext/mysqli/tests/mysqli_poll.phpt b/ext/mysqli/tests/mysqli_poll.phpt index c691835f32..dd4f9b9710 100644 --- a/ext/mysqli/tests/mysqli_poll.phpt +++ b/ext/mysqli/tests/mysqli_poll.phpt @@ -55,15 +55,9 @@ if (!$IS_MYSQLND) function poll_async($offset, $link, $links, $errors, $reject, $exp_ready, $use_oo_syntax) { - if ($use_oo_syntax) { - if ($exp_ready !== ($tmp = $link->poll($links, $errors, $reject, 0, 1000))) - printf("[%03d + 1] There should be %d links ready to read from, %d ready\n", - $exp_ready, $tmp); - } else { - if ($exp_ready !== ($tmp = mysqli_poll($links, $errors, $reject, 0, 1000))) - printf("[%03d + 1] There should be %d links ready to read from, %d ready\n", - $exp_ready, $tmp); - } + if ($exp_ready !== ($tmp = mysqli_poll($links, $errors, $reject, 0, 1000))) + printf("[%03d + 1] There should be %d links ready to read from, %d ready\n", + $exp_ready, $tmp); foreach ($links as $mysqli) { if ($use_oo_syntax) { diff --git a/ext/mysqli/tests/reflection_tools.inc b/ext/mysqli/tests/reflection_tools.inc index a96634b3c8..c8338bfa24 100644 --- a/ext/mysqli/tests/reflection_tools.inc +++ b/ext/mysqli/tests/reflection_tools.inc @@ -94,7 +94,7 @@ foreach ($params as $k => $param) $tmp[$param->getName()] = $param; - ksort($tmp, SORT_STRING); +// ksort($tmp, SORT_STRING); foreach ($tmp as $param) inspectParameter($method, $param); }