Re: function search incomplete
| From: | Christoph Becker | Date: | Tue, 24 Mar 2015 19:48:50 +0000 |
| Subject: | Re: function search incomplete | ||
| References: | 1 2 3 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969385522@lists.php.net to get a copy of this message | ||
Peter Bowers wrote:
> 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:
>
> ·6–
> mw2œPã2{Hhttp://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.
I agree that the search functionality should be improved, but until
someone finds the time to do so, a minor tweak to the existing search
functionality to be able to find procedural mysqli_stmt::* and
mysqli_driver::* aliases seems to be appropriate:
<https://github.com/php/systems/pull/4>
> 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
There is a (supposedly) complete list of all deprecated MySQLi functions on:
<http://php.net/manual/en/ref.mysqli.php>
mysqli::disable_reads_from_master is contained in this list.
--
Christoph M. Becker