title: Return remainder of a variable if started with given character
body: <p>If the value of a variable (i.e. <code>$var="^hello</code>";) starts with a given character (i.e. <code>^</code>), how could I return the remainder of that variable (i.e. <code>hello</code>), and return<code>FALSE</code> (or <code>NULL</code> or <code>0</code> if easier) if it doesn't start with the given character?  Note that there is no guarantee that the variable will be a string.  I tried the following, but it results in errors if the value is NULL.</p>
  
  <pre><code>$var='^hello'; //Works
  $var=123; //Works
  $var=NULL; //Doesn't work
  echo ($var[0]=='^')?substr($var,1):false;
  echo($new);
  </code></pre>