As here : W3
You can use PHP pack() Function like this :
<?php
echo pack("C3",80,72,80);
?>
And
<?php
echo pack("C*",80,72,80);
?>
Frage
I have the following piece of code written in C++.
But I'm converting my application to php, just to learning purpose.
And I have this small piece of code.
#define NETWORKMESSAGE_MAXSIZE 16384
unsigned char m_MsgBuf[NETWORKMESSAGE_MAXSIZE];
How I can reproduce this same code on PHP?
Lösung
As here : W3
You can use PHP pack() Function like this :
<?php
echo pack("C3",80,72,80);
?>
And
<?php
echo pack("C*",80,72,80);
?>