title: How to check if it is normal string or binary string in PHP?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/632685/how-to-check-if-file-is-ascii-or-binary-in-php">How to Check if File is ASCII or Binary in PHP</a>  </p>
  </blockquote>
  
  
  
  <p>I have function which accepts either the name of the file of an image (i.e. normal string) or it can directly accept the image bytes as binary string. As returned by <code>file_get_contents</code>.</p>
  
  <p>How can I differentiate between the two?</p>