print float as hex in php
<p>I would like any advice on how to convert this C code to PHP:</p>

<pre><code>int main() {
    char str[255];
    float var=1.3f;
    unsigned int *iptr;

    iptr=(unsigned int*) &amp;var;
    sprintf(str,"%X\n",*iptr);

}
</code></pre>

<p>Basically, I need to export a lot of floating point numbers from a php process to C process and I was thinking to do it through a file or pipe using HEX encoding instead of traditional number encoding with decimal point. On the C side I will just convert binary data to floats by casting.</p>
