Add an optional parameter to phpinfo() for html output in CLI SAPI
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
Every time exist more CLI app frameworks: amp, react, workerman, ...
And phpinfo(int $what = INFO_ALL): bool allways return an string output without HTML.
Every framework can create an html output, but I think that will be better return the same than in other SAPIs.
Now it's hardcoded in the C code the output.
Please add another parameter $html
phpinfo(int $what = INFO_ALL, $html = true): bool
Or add a option in php.ini, phpinfo.html=false , perhaps it's easier. By default for CLI will be false.
But will be changed easily for any CLI framework.
Thank you !!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the CLI SAPI's hardcoded phpinfo output in the C code and compare it with the HTML output produced by other SAPIs. Decide whether the behavior should use an optional parameter or a php.ini setting, then verify that CLI callers can request HTML while the existing default remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100