PHP code example of antalaron / circular-reference-detect

1. Go to this page and download the library: Download antalaron/circular-reference-detect library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

antalaron / circular-reference-detect example snippets




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