This little application was an attempt to map an image into an array of pixel objects using the PHP GD libraries and it's made me painfully aware of how limited PHP is in it's ability to handle large or complex data structures.
Below is a simple piece of code that attempts to copy each pixel value from an image into a pixel object and store it in a 2 dimensional array - anything over 150x150px and you run out of memory/if you don't store it then it takes forever to process
The only way to implement this kind of functionality within PHP is to write a specific extension for that purpose.. but then that's not really PHP anymore and it means you have to mess around with your server configuration in order to make it work... oh for java on cheap boxes :(