is it possible to make a c-like binary data(structure) in PHP
<p>This is C code.</p>

<pre><code>#pragma pack(push,1)
typedef struct _DATA_PKT_D1
{
    char    length[2];
    char    command[2];
    char    src[64];
    char    lordId;
    char    user_id[20];
    int     level;
    char    isFine;
    char    company_code;
}DATA_PKT_D1;
#pragma pack(pop)

DATA_PKT_D1 *pkt = malloc(sizeof(DATA_PKT_D1);

//send pkt through TCP socket. 
</code></pre>

<p>Data packet is 95byte. 
I know php has also tcp socket function. 
But, is it possible to make the packet exactly same in php? (95 byte I mean)
and send the data through tcp?
<br/><br/>
I doubt that php has binary level struct functionality...</p>

<p>Any hints plz~</p>
