We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

ishkur on 07/22/08


Tagged

hex convert bytecode


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

iTony


bytecode


Published in: PHP 


  1. function byteCode($data)
  2. {
  3. $hex = bin2hex($data);
  4. $hexArray = str_split($hex, 2);
  5. foreach($hexArray as $byteCode)
  6. {
  7. $return .= '\x'.$byteCode;
  8. }
  9. return $return;
  10. }

Report this snippet 

You need to login to post a comment.