https://github.com/outcompute/phpinfo
Get the output of phpinfo() as an array.
https://github.com/outcompute/phpinfo
php phpinfo
Last synced: 22 days ago
JSON representation
Get the output of phpinfo() as an array.
- Host: GitHub
- URL: https://github.com/outcompute/phpinfo
- Owner: outcompute
- License: gpl-2.0
- Created: 2017-02-20T01:04:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-08T14:05:17.000Z (over 5 years ago)
- Last Synced: 2025-04-24T05:48:49.539Z (about 1 month ago)
- Topics: php, phpinfo
- Language: PHP
- Size: 10.7 KB
- Stars: 6
- Watchers: 1
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHPInfo
A simple PHP library to get the output of [phpinfo()][phpinfoDoc] 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### Installation
Add this line to your composer.json file,
```json
"outcompute/phpinfo": "1.0.0"
```
and run.
```sh
$ composer update
```### How to use
```php
setText($phpinfoAsString);
var_export($phpInfo->get());
?>
```### TODO
(PRs are welcome)
- Add support for parsing the HTML version (the _parseHTML() method)
- Add test casesLicense
----GPL v2
[phpinfoDoc]: