Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 31st, 2012  |  syntax: None  |  size: 0.40 KB  |  views: 51  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. function test($in){
  3.     return strtoupper(bin2hex(iconv('UTF-8', 'UCS-2', $in)))."\n";
  4. }
  5. echo test('Sześć siedem');
  6. echo test('Źdźbło');
  7. echo test('String with no special chars');
  8.  
  9. ----------
  10. Results:
  11.  
  12. 53007A0065005B0107012000730069006500640065006D00
  13. 790164007A01620042016F00
  14. 53007400720069006E0067002000770069007400680020006E006F0020007300700065006300690061006C00200063006800610072007300