title: Retrieve all hashtags from a tweet in a PHP function
body: <p>I want to retrieve all hashtags from a tweet using a PHP function.</p>
  
  <p>I know someone asked a similar question <a href="https://stackoverflow.com/questions/952835/retrieve-all-hashtags-from-a-tweet">here</a>, but there is no hint how exactly to implement this in PHP. Since I'm not very familiar with regular expressions, don't know how to write a function that returns an array of all hashtags in a tweet. </p>
  
  <p>So how do I do this, using the following regular expression:</p>
  
  <pre><code>#\S*\w
  </code></pre>