PHP code example of macpaw / similar-arrays
1. Go to this page and download the library: Download macpaw/similar-arrays 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/ */
macpaw / similar-arrays example snippets
$similarArray = new SimilarArray();
$result = $similarArray->isArraysSimilar(['test'], ['test']);
var_dump($result) // true
$result = $similarArray->isArraysSimilar(['test'], ['exit']);
var_dump($result) // false
$similarArray = new SimilarArray();
$result = $similarArray->isArraysSimilar(['a' => '~\d+'], ['a' => 1111], ['a']);
var_dump($result) // true