PHP code example of chrisullyott / church-name-comparator

1. Go to this page and download the library: Download chrisullyott/church-name-comparator 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/ */

    

chrisullyott / church-name-comparator example snippets


$comparator = new ChrisUllyott\ChurchNameComparator();

$string1 = "First Baptist Church of South Lake";
$string2 = "fbc south lake";

$comparator->setStrings($string1, $string2);
$result = $comparator->isMatch();  
// bool(true)

$string1 = "St. Bartholomew's Church";
$string2 = "St Bart's";

$comparator->setStrings($string1, $string2);
$result = $comparator->isMatch();  
// bool(true)

$string1 = "Grace Episcopal Church";
$string2 = "Grace SBC";

$comparator->setStrings($string1, $string2);
$result = $comparator->isMatch();  
// bool(false)