PHPackages                             sebastian/comparator - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. sebastian/comparator

ActiveLibrary[Testing &amp; Quality](/categories/testing)

sebastian/comparator
====================

Provides the functionality to compare PHP values for equality

8.0.0(3mo ago)7.0k879.8M—0.3%68[15 issues](https://github.com/sebastianbergmann/comparator/issues)[11 PRs](https://github.com/sebastianbergmann/comparator/pulls)20BSD-3-ClausePHPPHP &gt;=8.4CI passing

Since May 2Pushed today7 watchersCompare

[ Source](https://github.com/sebastianbergmann/comparator)[ Packagist](https://packagist.org/packages/sebastian/comparator)[ Docs](https://github.com/sebastianbergmann/comparator)[ GitHub Sponsors](https://github.com/sebastianbergmann)[ Fund](https://liberapay.com/sebastianbergmann)[ RSS](/packages/sebastian-comparator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (68)Used By (20)

[![Latest Stable Version](https://camo.githubusercontent.com/e844bf4a6ff22e89077011618705e956094e67fda4d4b9c34c5d8bad9b7bf638/68747470733a2f2f706f7365722e707567782e6f72672f73656261737469616e2f636f6d70617261746f722f76)](https://packagist.org/packages/sebastian/comparator)[![CI Status](https://github.com/sebastianbergmann/comparator/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/comparator/actions)[![codecov](https://camo.githubusercontent.com/b7436d2135bffcdf97256dcccd76d1dbab84ec732e5f6f7b2ea2fcaa8669d3e3/68747470733a2f2f636f6465636f762e696f2f67682f73656261737469616e626572676d616e6e2f636f6d70617261746f722f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/sebastianbergmann/comparator)

sebastian/comparator
====================

[](#sebastiancomparator)

This component provides the functionality to compare PHP values for equality.

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

[](#installation)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require sebastian/comparator

```

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

```
composer require --dev sebastian/comparator

```

Usage
-----

[](#usage)

```
