If you are using PHP5.3 switch to MySQLi and enable MySQL Native Driver : http://php.net/manual/en/mysqli.installation.php
Just this gives you a good boost.
After that like other suggested, analyse your query (using EXPLAIN) to make sure it is as performant as it should be.
Better inform the OpenSSL project then. They use urandom for random number generation. If it's good enough for OpenSSL, why is it not good enough for us?
http://codepad.viper-7.com/ <- the best PHP pastebin by far.
http://ideone.com/ is also good for being able to paste and run many languages on the fly!
Alternatively,
prepend 4 spaces to lines, to format them as code
or `use backticks like this` to get inline code
.
Looks much cleaner!
If you run into any objects in your codebase that don't serialize nicely, you can change how it iterates over them by implemented the Iterable interface.