title: PHP: Simple, Validate if string is hex?
body: <p>I have no clue how to validate this string. I am simply supplying an IV for an encryption, but can find no 1is_hex()1 or similar function, I can’t wrap my head around it! I read on a comment in the php documentation (user contrib. notes) this:</p>
  
  <pre><code>if($iv == dechex(hexdec($iv))) {
    //True
  } else {
    //False
  }
  </code></pre>
  
  <p>But that doesn't seem to work at all.. It only says false.
  If it helps my input of my IV would be this:</p>
  
  <pre><code>92bff433cc639a6d
  </code></pre>