[](https://travis-ci.org/sebastianbergmann/comparator)# ComparatorThis component provides the functionality to compare PHP values for equality.## InstallationYou can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): composer require sebastian/comparatorIf 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```php<?phpuseSebastianBergmann\Comparator\Factory;useSebastianBergmann\Comparator\ComparisonFailure;$date1=newDateTime('2013-03-29 04:13:35',newDateTimeZone('America/New_York'));$date2=newDateTime('2013-03-29 03:13:35',newDateTimeZone('America/Chicago'));$factory=newFactory;$comparator=$factory->getComparatorFor($date1,$date2);try{$comparator->assertEquals($date1,$date2);print"Dates match";}catch(ComparisonFailure$failure){print"Dates don't match";}```