... string, is extremely slow in PHP. Becausethe functions were relatively optimal from a PHP perspective, we had a couple choices:nFix the cookie encoding inside PHP itself to be binary safe.nUse ... Benchmark libraries. Prior to PHP 4.3, the Benchmarkclass suite was packaged with PHP. After version 4.3, you need to either download theclasses from http://pear .php. net or use the PEAR installer ... looked efficient—The encoding functions are efficient, for code written in PHP. With more than 2,000 internal functions in PHP s standard library, it is nothard to imagine failing to find base64_encode()...