Re: function search incomplete

From: Date: Tue, 24 Mar 2015 16:51:49 +0000
Subject: Re: function search incomplete
References: 1 2  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969385521@lists.php.net to get a copy of this message
I should state up front that I am using a tool (DTRT - http://www.pmwiki.org/wiki/Cookbook/DoTheRightThing) which allows me to search from the address bar directly into this search-query: http://php.net/search.php?lang=en&show=quickref&pattern=PUT_SEARCH_TERM_HERE This is important because if I use the UI to type "mysqli_result::fetch_object" into the search box on php.net then the ajax lookup gives me a link I can click on. BUT, if I proceed with the search without clicking on that link then it sends me to the same "doesn't exist" page which usually doesn't even list my function in the probable results. If I replace all underscores with dashes and all double-colons with periods then often that search will work. But if I see this function in my code: $result->fetch_object() then I am going to search for "fetch_object" or (if I'm really familiar with the class structure) "mysqli_result::fetch_object". It would never occur to me to search for "mysqli-result.fetch-object". I really think, therefore, that your search should automatically allow for interchangeable dash/underscore and double-colon/hyphen so no matter what I type in it will find the appropriate function. Also, and perhaps most importantly, a search for "fetch_object" should find "mysqli-result.fetch-object". Currently I can find no permutation of characters in "fetch_object" which allows me to find the mysqli version of that function. Any way you look at it, as long as both the procedural and the OOP method are supported within PHP then *BOTH* of those variants should be searchable in a way that is obvious. But, having given that preamble, I have put together a quick script to search for every function (got the function list from http://php.net/manual/en/mysqli.summary.php with a bit of massaging), (The script took half of forever to run on my local home internet conx - I don't advise that.) For a given value like mysqli::foo_bar() it searched for the following: mysqli.foo-bar mysqli.foo_bar foo-bar foo_bar I have attached the bash script, the list of functions from the link mentioned, and the output. It should be clear, but the ones in checkfuncs.out with "OK" were a successful match and the ones with "BAD" were not found. From my perspective all the permutations I searched for should have been found. (See attached files) In addition I found a list of deprecated mysqli functions and did a similar search. I wasn't as exhaustive in that check, but it appears that this one was the only one completely missing in that list: http://php.net/manual/en/function.mysqli-disable-reads-from-master.php -Peter On Tue, Mar 24, 2015 at 1:01 AM, Christoph Becker <cmbecker69@gmx.de> wrote: > Peter Bowers wrote: > > > I've noticed several procedural function names within the mysqli or PDO > > sections are not searchable. Sometimes I can replace underscore with > hyphen > > or period[1] and find the function - other times it is just simply > > unavailable. > > Thanks for bringing this issue up again. It had already been reported > quite a while ago as #66340[1]. I have set up a feature branch to > improve the lookup[2]. > > > I am happy to start compiling a list if there is somewhere I can submit > it > > to, but if the compiled list would not have a happy ending then I don't > > want to waste the time. > > If there are other important function alias mappings, please let me > know, and I'll add them to the branch before submitting the pull request. > > [1] <https://bugs.php.net/bug.php?id=66340> > [2] <https://github.com/cmb69/systems/tree/lookup-hack> > > -- > Christoph M. Becker > >

$mysqli::affected_rows mysqli_affected_rows() $mysqli::client_info mysqli_get_client_info() $mysqli::client_version mysqli_get_client_version() $mysqli::connect_errno mysqli_connect_errno() $mysqli::connect_error mysqli_connect_error() $mysqli::errno mysqli_errno() $mysqli::error mysqli_error() $mysqli::field_count mysqli_field_count() $mysqli::host_info mysqli_get_host_info() $mysqli::protocol_version mysqli_get_proto_info() $mysqli::server_info mysqli_get_server_info() $mysqli::server_version mysqli_get_server_version() $mysqli::info mysqli_info() $mysqli::insert_id mysqli_insert_id() $mysqli::sqlstate mysqli_sqlstate() $mysqli::warning_count mysqli_warning_count() mysqli::autocommit() mysqli_autocommit() mysqli::change_user() mysqli_change_user() mysqli::character_set_name() mysqli::client_encoding mysqli_character_set_name() mysqli_client_encoding() mysqli::close() mysqli_close() mysqli::commit() mysqli_commit() mysqli::__construct() mysqli_connect() mysqli::debug() mysqli_debug() mysqli::dump_debug_info() mysqli_dump_debug_info() mysqli::get_charset() mysqli_get_charset() mysqli::get_connection_stats() mysqli_get_connection_stats() mysqli::get_client_info() mysqli_get_client_info() mysqli::get_client_stats() mysqli_get_client_stats() mysqli::get_cache_stats() mysqli_get_cache_stats() mysqli::get_server_info() mysqli_get_server_info() mysqli::get_warnings() mysqli_get_warnings() mysqli::init() mysqli_init() mysqli::kill() mysqli_kill() mysqli::more_results() mysqli_more_results() mysqli::multi_query() mysqli_multi_query() mysqli::next_result() mysqli_next_result() mysqli::options() mysqli_options() mysqli_set_opt() mysqli::ping() mysqli_ping() mysqli::prepare() mysqli_prepare() mysqli::query() mysqli_query() mysqli::real_connect() mysqli_real_connect() mysqli::real_escape_string() mysqli::escape_string() mysqli_real_escape_string() mysqli_escape_string() mysqli::real_query() mysqli_real_query() mysqli::refresh() mysqli_refresh() mysqli::rollback() mysqli_rollback() mysqli::select_db() mysqli_select_db() mysqli::set_charset() mysqli_set_charset() mysqli::set_local_infile_default() mysqli_set_local_infile_default() mysqli::set_local_infile_handler() mysqli_set_local_infile_handler() mysqli::ssl_set() mysqli_ssl_set() mysqli::stat() mysqli_stat() mysqli::stmt_init() mysqli_stmt_init() mysqli::store_result() mysqli_store_result() mysqli::thread_id() mysqli_thread_id() mysqli::thread_safe() mysqli_thread_safe() mysqli::use_result() mysqli_use_result() $mysqli_stmt::affected_rows mysqli_stmt_affected_rows() $mysqli_stmt::errno mysqli_stmt_errno() $mysqli_stmt::error mysqli_stmt_error() $mysqli_stmt::field_count mysqli_stmt_field_count() $mysqli_stmt::insert_id mysqli_stmt_insert_id() $mysqli_stmt::num_rows mysqli_stmt_num_rows() $mysqli_stmt::param_count mysqli_stmt_param_count() mysqli_param_count() $mysqli_stmt::sqlstate mysqli_stmt_sqlstate() mysqli_stmt::attr_get() mysqli_stmt_attr_get() mysqli_stmt::attr_set() mysqli_stmt_attr_set() mysqli_stmt::bind_param() mysqli_stmt_bind_param() mysqli_bind_param() mysqli_stmt::bind_result() mysqli_stmt_bind_result() mysqli_bind_result() mysqli_stmt::close() mysqli_stmt_close() mysqli_stmt::data_seek() mysqli_stmt_data_seek() mysqli_stmt::execute() mysqli_stmt_execute() mysqli_execute() mysqli_stmt::fetch() mysqli_stmt_fetch() mysqli_fetch() mysqli_stmt::free_result() mysqli_stmt_free_result() mysqli_stmt::get_result() mysqli_stmt_get_result() mysqli_stmt::get_warnings() mysqli_stmt_get_warnings() $mysqli_stmt::more_results() mysqli_stmt_more_results() $mysqli_stmt::next_result() mysqli_stmt_next_result() mysqli_stmt::num_rows() mysqli_stmt_num_rows() mysqli_stmt::prepare() mysqli_stmt_prepare() mysqli_stmt::reset() mysqli_stmt_reset() mysqli_stmt::result_metadata() mysqli_stmt_result_metadata() mysqli_get_metadata() mysqli_stmt::send_long_data() mysqli_stmt_send_long_data() mysqli_send_long_data() mysqli_stmt::store_result() mysqli_stmt_store_result() $mysqli_result::current_field mysqli_field_tell() $mysqli_result::field_count mysqli_num_fields() $mysqli_result::lengths mysqli_fetch_lengths() $mysqli_result::num_rows mysqli_num_rows() mysqli_result::data_seek() mysqli_data_seek() mysqli_result::fetch_all() mysqli_fetch_all() mysqli_result::fetch_array() mysqli_fetch_array() mysqli_result::fetch_assoc() mysqli_fetch_assoc() mysqli_result::fetch_field_direct() mysqli_fetch_field_direct() mysqli_result::fetch_field() mysqli_fetch_field() mysqli_result::fetch_fields() mysqli_fetch_fields() mysqli_result::fetch_object() mysqli_fetch_object() mysqli_result::fetch_row() mysqli_fetch_row() mysqli_result::field_seek() mysqli_field_seek() mysqli_result::free() mysqli_result::close mysqli_result::free_result mysqli_free_result() mysqli_driver::embedded_server_end() mysqli_embedded_server_end() mysqli_driver::embedded_server_start() mysqli_embedded_server_start() Attachment: [application/octet-stream] checkfuncs.out
Attachment: [application/x-sh] checkfuncs.sh
mysqli_bind_param mysqli_bind_result mysqli_client_encoding mysqli_connect mysqli::disable_reads_from_master mysqli_disable_rpl_parse mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_escape_string mysqli_execute mysqli_fetch mysqli_get_cache_stats mysqli_get_links_stats mysqli_get_metadata mysqli_master_query mysqli_param_count mysqli_report mysqli_rpl_parse_enabled mysqli_rpl_probe mysqli_send_long_data mysqli::set_opt mysqli_slave_query
« previous php.doc (#969385521) next »