These instructions will install the ImageMagick binaries as well as the PHP extension for the default OSX Apache/PHP setup. If you prefer not to use MacPorts there are binaries available, however you may have to deal with some dependencies and configuration on your own. 1. Install ImageMagick sudo port install ImageMagick 2. Install imagic module [...]
Four Reasons to NOT use try/catch
I was reading an argument discussion on google groups regarding the try/catch statement and node.js. In particular there was a suggestion that try/catch is an anti-pattern, meaning a poor development habit that is in common use. I can’t really agree that try/catch on it’s own is a bad thing but it is certainly easy to [...]
Installing LAMP Stack on OSX 10.7 Lion
This is a follow-up to my previous article on installing a LAMP Stack on Snow Leopard and explains the steps that you need to get Lion up and running for LAMP development. (Linux, Apache, MySQL and PHP in case you don’t already know). Lion comes pre-installed with Apache and PHP 5.3.6 so you only need [...]
Installing Zend PHP Debugger in Eclipse on OSX
This walk-through video shows how to install and enable PHP debugging using the Zend debugger in Eclipse on OSX. Instead of using print_r and die statements you can step through your code line-by-line, inspect variables and objects, set breakpoints and view the call stack. Using a debugger really pays off in the long run in [...]
Evaluating Math in PHP
This is a simple math formula parser for PHP. This is based off of various comments at php.net. For security all alphabetical characters are stripped which means that functions like sin, cos, etc are not supported. Please leave any improvements or suggestions in the comments below. /** * Evaluates a math equation and returns the result, [...]