faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

19 of 38 people (50%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How do you convert this perl code unpack('s', pack('s', hex($x))) to PHP

Mar 15th, 2008 21:29
dman, ha mo, Chris Kings-Lynne, Maxen, http://www.ttnr.org


Use the pack() and unpack() functions of PHP, they have the same
functionality and most of the string formatting codes are same as in
perl.  They appear 
under 'Miscellaneous Functions'.