PHP code example of piscibus / php-hashtag

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

    

piscibus / php-hashtag example snippets


use Piscibus\PhpHashtag\Extractor;

$text = 'This is an #English #text with #hashtags';

$hashtags = Extractor::extract($text); // ['English', 'text', 'hashtags']

// Or you can use the helper function

$hashtags = extract_hashtags($text); // ['English', 'text', 'hashtags']
bash
composer