I am a bit confiused about the “pack” / “unpack” php Function, so i need the php Equivalent to the following Java Code
....
byte[] TempByte = {1, (byte)0x01};
...
php:
?
thx
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not 100% sure what that Java code does, but it looks equivalent to something like this:
“Byte arrays” are essentially strings in PHP, or rather “strings” are essentially byte arrays in PHP. You can even access this “byte array” using the array offset syntax: