title: Getting the first character of a string with $str[0]
body: <p>I want to get the first letter of a string and I've noticed that <code>$str[0]</code> works great. I am just not sure whether this is 'good practice', as that notation is generally used with arrays. This feature doesn't seem to be very well documented so I'm turning to you guys to tell me if it's all right &ndash; in all respects &ndash; to use this notation?</p>
  
  <p>Or should I just stick to the good ol' <code>substr($str, 0, 1)</code>?</p>
  
  <p>Also, I noted that curly braces (<code>$str{0}</code>) works as well. What's up with that?</p>