1. Go to this page and download the library: Download gtmassey/thread 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/ */
gtmassey / thread example snippets
use Gtmassey\Thread\Thread;
use Thread;
$string = new Thread('Hello world!');
echo($string->toString());
// "Hello world!"
$emptyString = new Thread();
echo($emptyString->toString());
// ""
$string = Thread::make('a b c');
//OR
$string = Thread::make(['a', 'b', 'c']);
echo($string->toString());
// "Hello world!"
$string = Thread::of('a b c');
//OR
$string = Thread::of(['a', 'b', 'c']);
echo($string->toString());
// "a b c"
$string = Thread::from('a b c');
//OR
$string = Thread::from(['a', 'b', 'c']);
echo($string->toString());
// "a b c"