I used to be a PHP developer, but it has been years now since I did some serious work with it. So while my existing answers might be useful, I don't think I can provide insightful updates on them anymore.
In addition to the standard Creative Commons license of this site, I give permission to use all my contributions under the GPL license (version 2). Feel free to re-use it in plugins, themes, or in the Codex.