Skip to content

antalaron/circular-reference-detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Circular reference detect

Build Status Coverage Status Latest Stable Version Latest Unstable Version License

PHP library to detect reference circular references in array.

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this library:

$ composer require antalaron/circular-reference-detect

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Usage

Find a circular reference in an array:

require __DIR__.'/vendor/autoload.php';

use Antalaron\Component\CircularReferenceDetect\CircularReferenceDetect;
$a = [
    'a' => ['b'],
    'b' => ['c'],
    'c' => ['a'],
];
$detector = new CircularReferenceDetect();
$detector->hasCircularReference($a);

Documentation

  1. Installation
  2. Usage
  3. Contributing

License

This library is under MIT License.

About

PHP library to detect reference circular references in array

Topics

Resources

License

Stars

3 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages