PHP code example of eftec / mapache-commons

1. Go to this page and download the library: Download eftec/mapache-commons 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/ */

    

eftec / mapache-commons example snippets


$isAssoc=CollectionLib::isAssoc($array); // slow, more precise.
$isAssoc=CollectionLib::isAssoc($array,true); // fast, less precise

$string=CollectionLib::xmlToString($xml,true); // "<root>...</root>"

$xml=CollectionLib::arrayToXML($array,'root'); // <root>...</root>

TextLib::hasParenthesis('hello'); // return false;
TextLib::hasParenthesis('(hello)'); // return true;