PHPackages                             ngmy/phpinfocmp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ngmy/phpinfocmp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ngmy/phpinfocmp
===============

PhpinfoComparator is compare two phpinfo() files.

0.2.0(7y ago)4116MITHTMLPHP &gt;=7.1.0

Since Nov 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ngmy/phpinfocmp)[ Packagist](https://packagist.org/packages/ngmy/phpinfocmp)[ RSS](/packages/ngmy-phpinfocmp/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

PhpinfoComparator
=================

[](#phpinfocomparator)

[![Build Status](https://camo.githubusercontent.com/9279f45ca0b27800dd85f8880ec099267ed700c29d36524df25c471a1f9510fe/68747470733a2f2f7472617669732d63692e6f72672f6e676d792f706870696e666f636d702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ngmy/phpinfocmp)[![Coverage Status](https://camo.githubusercontent.com/0843fb359aedaebc7b9a309cbe1c4bad5799affca45b5c6e3719554e8f0ae142/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6e676d792f706870696e666f636d702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/ngmy/phpinfocmp?branch=master)

PhpinfoComparator is compare two `phpinfo()` files.

Requirements
------------

[](#requirements)

PhpinfoComparator has the following requirements:

- PHP &gt;= 7.1.0

Installation
------------

[](#installation)

Install PhpinfoComparator globally as a system wide by using the Composer:

```
composer global require ngmy/phpinfocmp
```

Or alternatively, install PhpinfoComparator locally as part of your project by using the Composer:

```
composer require ngmy/phpinfocmp
```

Usage
-----

[](#usage)

Compare two `phpinfo()` files on two remote servers:

```
phpinfocmp http://server1/phpinfo http://server2/phpinfo > phpinfo_diff.html
```

Compare two html `phpinfo()` files on one local machine:

```
phpinfocmp --fetch-mode1=file --fetch-mode2=file phpinfo1.html phpinfo2.html > phpinfo_diff.html
```

Compare two text `phpinfo()` files on one local machine:

```
phpinfocmp --fetch-mode1=file --fetch-mode2=file --file-format1=text --file-format2=text phpinfo1.txt phpinfo2.txt > phpinfo_diff.html
```

You can combine different fetch modes and file formats:

```
phpinfocmp --fetch-mode2=file http://server1/phpinfo phpinfo.html > phpinfo_diff.html
```

```
phpinfocmp --fetch-mode1=file --fetch-mode2=file --file-format2=text phpinfo.html phpinfo.txt > phpinfo_diff.html
```

You can read fetch options from a specified PHP file:

```
phpinfocmp --fetch-options1=fetch_options.php --fetch-options2=fetch_options.php https://server1/phpinfo https://server2/phpinfo > phpinfo_diff.html
```

The PHP file must be an array format that can be passed to `curl_setopt_array()` as following:

```
