How To: Byte Arrays in PHP

Posted on 2007-07-26
Medium Priority
Last Modified: 2012-05-05
How can i convert this c# snippet to PHP to pass the result as a paramater to a web service method call

string pub_key = "BC542794-2738-4BCD-B1E4-C4E64457GE80";
byte[]  pub_bytes = ( new Guid( pub_key ) ).ToByteArray();

Thanks for the help!
Question by:amagondes
1 Comment
LVL 48

Accepted Solution

hernst42 earned 2000 total points
ID: 19578803
In php there is no real difference between strings and bytearrays.
What does the class Guid make. In php there is no such class or similar function.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month17 days, 12 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question