PHP code example of panduanvip / helpers

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

    

panduanvip / helpers example snippets




nduanVIP\Helpers\Please;

echo Please::getWebContent('https://google.com');

echo Please::getWebContents(['https://google.com', 'https://yahoo.com']);

echo Please::createRandomString();

$array = ['Pen', 'Book', 'Laptop', 'Bus', 'Plane', ''];
$result = Please::pickOneRandom($array);

$string = "Gunadarma , Jayabaya, Pancasila,,";
$result = Please::trimAllSpaces($string, ',');

$string = "{green|blue|yellow} bird is sitting {there|over there|on the ground}.";
$result = Please::createSpintax($string);

$string = <<<test
Example of string
spanning multiple lines
using heredoc syntax.
test;

$result = Please::explodeNewLine($string);

$string = "PHP is a general-purpose scripting language especially suited to web development. It was stringly created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The PHP reference implementation is now produced by The PHP Group.";
$result = Please::createExcerpt($string, 50);

$string = "Lorem     ipsum dolor sit amet,   consectetur adipiscing elit";
$result = Please::removeDoubleSpace($string);

$string = "This is my dog!";
$result = Please::getStringBetween($string, "my", "!");

$string = "красивые сакуры";
$result = Please::createSlug($string);