fork download
  1. <?php
  2. function base64decode($base64)
  3. {
  4. $table64_inverse = array_flip(str_split('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'));
  5.  
  6. $string = 'U2FsdXQsIGplIHN1aXMgdW5lIHBocmFzZSBkZSB0ZXN0LiAoTmUgdHJvdXZlei12b3VzIHBhcyBjZWzDoCBleHRyYW9yZGluYWlyZSA/KSBAKys=';
  7. $bin = $binlen = 0;
  8. $strlen = strlen(rtrim($base64, '='));
  9. for ($i = 0; $i < $strlen; $i++)
  10. {
  11. $bin <<= 6;
  12. $bin |= $table64_inverse[$base64[$i]];
  13. $binlen += 6;
  14. if ($binlen >= 8)
  15. {
  16. $binlen -= 8;
  17. $string .= chr($bin >> $binlen);
  18. $bin &= (1 << $binlen) - 1;
  19. }
  20. }
  21.  
  22. return $string;
  23. }
  24. ?>
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:43: warning: character constant too long for its type
prog.cpp:6:13: warning: character constant too long for its type
prog.cpp:1: error: expected unqualified-id before ‘<’ token
stdout
Standard output is empty