PHP code example of const-g / cleaner

1. Go to this page and download the library: Download const-g/cleaner 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/ */

    

const-g / cleaner example snippets



$company_name = \Constg\Cleaner\Clean::company_names('Google inc.');
// array(
//     'original_name' => $company_name,
//     'split' => array('google'),
//     'clean_name' => 'google',
//     'clean_name_no_space' => 'google',
// );


$company_name = \Constg\Cleaner\Clean::company_names('Google France');
// array(
//     'original_name' => $company_name,
//     'split' => array('google'),
//     'clean_name' => 'google',
//     'clean_name_no_space' => 'google',
// );


$company_name = \Constg\Cleaner\Clean::company_names('B.M.W Group');
// array(
//     'original_name' => 'B.M.W Group',
//     'split' => array('bmw'),
//     'clean_name' => 'bmw',
//     'clean_name_no_space' => 'bmw',
// );


$company_name = \Constg\Cleaner\Clean::company_names('COMPAGNIE GENERALE DES ETABLISSEMENTS MICHELIN (C G E M)');
// array(
//     'original_name' => 'COMPAGNIE GENERALE DES ETABLISSEMENTS MICHELIN (C G E M)',
//     'split' => array('compagnie', 'etablissements', 'generale', 'michelin'),
//     'clean_name' => 'compagnie etablissements generale michelin',
//     'clean_name_no_space' => 'compagnieetablissementsgeneralemichelin',
//     'acronym' => 'cgem',
// );