Removing mysqlnd stats from phpinfo

php.internals

Pieter Hordijk

7 years ago
Hey internals, when there is support for mysqlnd the `phpinfo()` page hows the entire list of available mysqlnd stats. Do we really need to show the stats here? It makes the page unnecessary long and somewhat annoying to scroll past for no obvious (to me) reason it to be there. The stats can also already be retrieved using the APIs @ https://www.php.net/manual/en/mysqlnd.stats.php making it even less useful to have on the page. I created a PR to remove the stats https://github.com/php/php-src/pull/4164 Can this just be merged or is there a specific reason the stats are on the page? Also related to https://bugs.php.net/bug.php?id=60594 which basically states the same things as above. Pieter

Johannes Schlüter

7 years ago
On Mi, 2019-05-15 at 19:01 +0200, Pieter Hordijk wrote:
> Hey internals, > > when there is support for mysqlnd the `phpinfo()` page hows the > entire list of available mysqlnd stats. > > Do we really need to show the stats here? It makes the page > unnecessary long and somewhat annoying to scroll past for no obvious > (to me) reason it to be there. >
In a way it gives nice attention to the fact thy are there. But I guess they don't have to be there. If this makes he page too long removing is fine. johannes

Peter Bowyer

7 years ago
If the problem is that (multiple) people find the page too long to scroll through, we can add some JavaScript to the output to hide the stats by default. This could be a good time to make all blocks on the page collapsible, with a "Collapse/Expand all" link added at the top. All added as progressive enhancement, so people with JavaScript disabled see everything. Though personally I have no problem with the length of the page; I use the browser's in-built "Find" tool to jump to where I need to go. Peter On Thu, 16 May 2019 at 22:41, Johannes Schlüter < johannes.schlueter@oracle.com> wrote:

Claude Pache

7 years ago
> Le 17 mai 2019 à 09:35, Peter Bowyer <phpmailinglists@gmail.com> a écrit : > > This could be a good time to make all blocks on the page collapsible, with > a "Collapse/Expand all" link added at the top. > > All added as progressive enhancement, so people with JavaScript disabled > see everything.
There is no need for JavaScript: use <details> (as progressive enhancement, etc.) —Claude

Peter Cowburn

7 years ago
On Fri, 17 May 2019 at 09:15, Claude Pache <claude.pache@gmail.com> wrote:
> > > > Le 17 mai 2019 à 09:35, Peter Bowyer <phpmailinglists@gmail.com> a > écrit : > > > > This could be a good time to make all blocks on the page collapsible, > with > > a "Collapse/Expand all" link added at the top. > > > > All added as progressive enhancement, so people with JavaScript disabled > > see everything. > > There is no need for JavaScript: use <details> (as progressive > enhancement, etc.) >
How will that work for the cli (e.g. php -i)?

Pieter Hordijk

7 years ago
> > There is no need for JavaScript: use <details> (as progressive enhancement, etc.)
> How will that work for the cli (e.g. php -i)?
The situation on CLI is arguably even worse with very long lists like that and indeed things like JS or details tags would obviously not work for that.

Johannes Schlüter

7 years ago
On Fr, 2019-05-17 at 09:20 +0100, Peter Cowburn wrote:
> On Fri, 17 May 2019 at 09:15, Claude Pache <claude.pache@gmail.com> > wrote: > > > > > > > > > > > > > Le 17 mai 2019 à 09:35, Peter Bowyer <phpmailinglists@gmail.com> > > > a > > écrit : > > > > > > > > > This could be a good time to make all blocks on the page > > > collapsible, > > with > > > > > > a "Collapse/Expand all" link added at the top. > > > > > > All added as progressive enhancement, so people with JavaScript > > > disabled > > > see everything. > > There is no need for JavaScript: use <details> (as progressive > > enhancement, etc.) > > > How will that work for the cli (e.g. php -i)? >
You at last have `php --ri standard` etc. won't help with all sections, though. Probably the most important missing is a shortcut for a pretty printed version of     php -r 'print_r(ini_get_all());' But I don't want to deflect from the original question. If consensus is that it's too long, the stats can go ... johannes