kvz.io

Php

  • Published on
    I tried to do some Image Magick with PHP recently on an Ubuntu Feisty machine, and even though I had the required package: 'php5-imagick' installed, and I updated my php.ini with imagick.so, I kept getting the error Class 'Imagick' not found. This is how I eventually fixed it.
  • Published on
    I recently faced a programming challenge that almost broke my brain. I needed to create a function that could explode any single-dimensional array into a full blown tree structure, based on the delimiters found in its keys. Tricky part was size of the tree could be infinite. I called the function: explodeTree. And maybe it's best to first look at an example.
  • Published on
    Every time a request hits your server, PHP has to do a lot of processing, all of your code has to be compiled & executed for every single visit. Even though the outcome of all this processing is often identical for both visitor 21600 and 21601. So why not save the flat HTML generated for visitor 21600, and serve that to 21601 as well? This will relieve resources of your web server and database server because less PHP often means less queries.