How To: Byte Arrays in PHP

Posted on 2007-07-26
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

    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

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily 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…
    The viewer will learn how to count occurrences of each item in an array.

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now