Skip to content

Deeper is a easy way to compare if 2 objects is equal based on values in these objects. This library is heavily inspired in Golang's reflect.DeepEqual().

License

Notifications You must be signed in to change notification settings

hopeseekr-contribs/Deeper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deeper

Deeper is a easy way to compare if 2 objects is equal based on values in these objects. This library is heavily inspired in Golang's reflect.DeepEqual().

Deeper supports parent class with any kind of access attributes, public, protected and private. Deeper validates objects as atribbutes too, then, while have objects to test, Deeper will test recursively.

Installation

composer require redrat/deeper

Usage

It's very easy, create instance of Deeper object with objects to compare and check if it deep equal, like example below.

use RedRat\Deeper\Deeper;

$deeper = new Deeper($objectOne, $objectTwo);
$deeper->isEqual(); // if have same values on both objects, return TRUE

Known limitations

Some PHP core objects can't work properly, in this case, open an issue for we create a custom validation for this object.

Author

Joubert RedRat and the contributors

License

The cute and amazing MIT.

About

Deeper is a easy way to compare if 2 objects is equal based on values in these objects. This library is heavily inspired in Golang's reflect.DeepEqual().

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%