fork download
  1. <?php
  2.  
  3. $str = 'uvjWEHTUk1LnzVZul9ynRpezWfKYN3bvlx103wxACxo';
  4. $bin = base64_decode($str);
  5.  
  6. if (strlen($bin) % 8 !== 0) {
  7. throw new \RuntimeException('data length should be divisible by 8');
  8. }
  9.  
  10. $result = '';
  11.  
  12. for ($i = 0; $i < strlen($bin); $i += 8) {
  13. for ($j = $i + 7; $j >= $i; --$j) {
  14. $result .= bin2hex($bin[$j]);
  15. }
  16. }
  17.  
  18. echo $result;
Success #stdin #stdout 0.02s 24396KB
stdin
Standard input is empty
stdout
5293d47410d6f8ba46a7dc976e56cde7ef763798f259b3971a0b400cdf741d97