Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via composer

sebastian/comparator 2.1.0

Provides the functionality to compare PHP values for equality
Package summary
Share
0
issues
1
license
4
BSD-3-Clause
Package created
22 Jan 2014
Version published
3 Nov 2017
Maintainers
1
Total deps
4
Direct deps
2
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
sebastian/comparator@2.1.0
sebastian/diff@2.0.1
sebastian/exporter@3.1.6
sebastian/recursion-context@3.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of sebastian/comparator 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
sebastian/diff2.0.131.89 kBBSD-3-Clause
prod
sebastian/exporter3.1.6-BSD-3-Clause
prod

Visualizations

Frequently Asked Questions

What does sebastian/comparator do?

Sebastian/comparator is a handy PHP library that provides the functionality to compare PHP values for equality. This could be beneficial in numerous scenarios where you need to ascertain if the given PHP values are equal or not.

How do you use sebastian/comparator?

To use sebastian/comparator, you need to follow these simple steps:

First, you need to install the library using Composer. It can be added either as a local, per-project dependency:

composer require sebastian/comparator

Or, if you only need this library during development (for instance, to run your project's test suite), you can add it as a development-time dependency:

composer require --dev sebastian/comparator

Once installed, you can use it in your PHP scripts like so:

<?php
use SebastianBergmann\Comparator\Factory;
use SebastianBergmann\Comparator\ComparisonFailure;

$date1 = new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York'));
$date2 = new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/Chicago'));

$factory = new Factory;
$comparator = $factory->getComparatorFor($date1, $date2);

try {
    $comparator->assertEquals($date1, $date2);
    print "Dates match";
} catch (ComparisonFailure $failure) {
    print "Dates don't match";
}

In the above snippet, we're using the library to compare two date objects.

Where are the sebastian/comparator docs?

The Sebastian/comparator's documentation isn't hosted on a separate website. You can instead refer to its GitHub page for detailed instructions on installing and using the library. The "readme" file in the repository provides a comprehensive guide to get started with sebastian/comparator.