I want convert 365 decimal to binary (each number four bytes) So i convert:
pack("s*",1); // output .... , in hexedidor: 01000000
And this is the correct output But when conver 365 :
pack("s*",365); // output m... in hexeditr:6D000100
But I expect 6D010000
How can I get that conclusion? example output I need 1
my code :
$content= pack("s*",365);
file_put_contents("file.txt",iconv("UTF-8","UTF-16LE",$content));