title: Fastest way to check if a string is JSON in PHP?
body: <p>I need a really, really fast method of checking if a string is JSON or not. I feel like this is not the best way:</p>
  
  <pre><code>function isJson($string) {
      return ((is_string($string) &amp;&amp;
              (is_object(json_decode($string)) ||
              is_array(json_decode($string))))) ? true : false;
  }
  </code></pre>
  
  <p>Any performance enthusiasts out there want to improve this method?</p>