Found via Daring Fireball
: an installer package for the commandline version of PHP for Mac OS X: somebody dial 911
Easy to install and great fun.
I'm playing around with this at the moment but expect to see a small example later this week (possibly tonight but who knows what might happen, I gotta eat too you know...).
it's here, a commandline php script to urldecode or urlencode a string of text