I thought I might “publicise” some of the code buried within this site. There are some useful things in here (even if I do say so myself) ;). And it would be a shame not to ‘blog’ from the rooftops. Some of the code isn’t much use in the real world, but it serves its purpose of teaching both programming methods and how to do funky things in PHP.
For first up, is arbitrary number base conversion in PHP. I know PHP has a built in base_convert() function, plus several other specific base conversion functions, e.g. decbin(), but I wanted to a) show how to do it, and b) implement one which could do bases 2-62 (default PHP ones does 2-36).