18/02
2017
Wallogit.com
2017 © Pedro Peláez
Get the output of phpinfo() as an array.
A simple PHP library to get the output of phpinfo() as an array when invoked from a command line script. You can submit a PR if you adapt it to the HTML version. Although by now you can compile the information to a reasonable degree of completeness from other functions, so this will be of use only when you absolutely have to parse phpinfo(). - Returns nested information for Configuration, modules in Configuration, Environment, PHP Variables & PHP License, (*1)
Add this line to your composer.json file,, (*2)
"outcompute/phpinfo": "1.0.0"
and run., (*3)
$ composer update
setText($phpinfoAsString); var_export($phpInfo->get()); ?>
(PRs are welcome) - Add support for parsing the HTML version (the _parseHTML() method) - Add test cases, (*4)
GPL v2, (*5)