PHP code example of sinevia / php-library-utils

1. Go to this page and download the library: Download sinevia/php-library-utils 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/ */

    

sinevia / php-library-utils example snippets


\Sinevia\Utils::raiseMemoryLimits();

\Sinevia\ArrayUtils::columns($array);

\Sinevia\ArrayUtils::isAssoc($array);

\Sinevia\ArrayUtils::toCsv($array, $forceQuotes=true);

\Sinevia\BrowserUtils::fingerprint();

\Sinevia\CsvUtils::write($filename, $array);

\Sinevia\DataUtils::serialize($data, $pass);

\Sinevia\DataUtils::unserialize($data, $pass);

\Sinevia\LinkUtils::getBaseUrl(); // ""

\Sinevia\LinkUtils::setBaseUrl("https://yahoo.com"); // ""

\Sinevia\LinkUtils::buildUrl("/", ['a'=>'A', 'b'=>'B']); // "/?a=A&b=B"

\Sinevia\StringUtils::between("ABCDEFG","B","E"); // "CD"

\Sinevia\StringUtils::isEmail("test@test"); // false

\Sinevia\StringUtils::isJson("ABC"); // false

\Sinevia\StringUtils::rand(8); // "aBDhkDyD"
\Sinevia\StringUtils::rand(8, "ABC"); // "BABCCB"

\Sinevia\StringUtils::toArray("ABC"); // ["A", "B", "C"]

\Sinevia\Utils::ip();