static public function getAllSubStrings($text)
    {
        $splitText = str_split($text);
        $splitCount = count($splitText);
        $subStrings = [];
        for ($i = 0; $i < $splitCount; $i++)
        {
            for ($j = $i; $j < $splitCount; $j++)
            {
                $subStrings[] = implode(array_slice($splitText, $i, $j - $i + 1));
            }
        }
        return $subStrings;
    }
static public function getAllSubStrings($text)
    {
        $splitText = str_split($text);
        $splitCount = count($splitText);
        $subStrings = [];
        for ($i = 0; $i < $splitCount; $i++)
        {
            for ($j = $i; $j < $splitCount; $j++)
            {
                $subStrings[] = implode(array_slice($splitText, $i, $j - $i + 1));
            }
        }
        return $subStrings;
    }
static public function getAllSubStrings ( $ text ) { $ splitText = str_split ( $ text ) ; $ splitCount = count ( $ splitText ) ; $ subStrings = [ ] ; for ( $ i = 0 ; $ i < $ splitCount ; $ i ++ ) { for ( $ j = $ i ; $ j < $ splitCount ; $ j ++ ) { $ subStrings [ ] = implode ( array_slice ( $ splitText , $ i , $ j - $ i + 1 ) ) ; } } return $ subStrings ; }
Takes a string and produces all possible substrings
@param string $text
@return array
Takes a string and produces all possible substrings