Code Monkey home page Code Monkey logo

deeper's Introduction

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.

deeper's People

Contributors

joubertredrat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.