title: How to get binary representation of floating-point number in PHP?
body: <p>Is there any way to get the binary representation of a floating point number in PHP? Something like Java's <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Double.html#doubleToRawLongBits(double)" rel="noreferrer">Double.doubleToRawLongBits()</a>.</p>
  
  <p>Given a positive floating point number, I'd like to get the largest representable floating-point number which is less than that number. In Java, I can do it like this:</p>
  
  <pre><code>double x = Double.longBitsToDouble(Double.doubleToRawLongBits(d) - 1);
  </code></pre>
  
  <p>But I'm not seeing anything similar in PHP.</p>