PHP code example of reenexe / compare-data-structure
1. Go to this page and download the library: Download reenexe/compare-data-structure 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/ */
/**
* @return StructureDiffInfo
*/
Comparator::check($data, $structure)
/**
* @method public bool StructureDiffInfo::isEqual
* @method public string StructureDiffInfo::getMessage
* @method public string StructureDiffInfo::getPath
*/
use ReenExe\CompareDataStructure\Comparator;
class Test extends PHPUnit_Framework_TestCase{
public function testSimple()
{
$diff = Comparator::check(1, 'integer');
$this->assertTrue($diff->isEqual(), $diff);
}
}