PHP Tricks and Best Practices?
rshao: This is a bit of a specific one, but the array_shift function is really slow on large arrays. The workaround I found is to use array_slice and unset the array index afterward.Overall though, I find out about a lot of cool things just from the comments on the php.net site. For example, I learned how to use pcntl_fork from the socket_accept page, and then I found out about socket_create_listen from one of the process control pages.My approach is basically just to figure out what I want to do on a higher level, and look for sample code on all the individual parts. Then who knows, I might discover something amazing.