Yearly Archives: 2011

Variable-length Argument Lists in PHP with func_get_args()

Have you ever wanted to write a function in PHP that would accept a varying amount of arguments rather than requiring ones arbitrarily hard-coded? I can’t think of a reason why you would off the top of my head, but I know I’ve wished for such an ability before. There’s a PHP function called func_get_args() that will let you do that with minimal effort.

function myFunc() {

$args = func_get_args();

foreach ($args as $key => $value) {
echo "Argument {$key}: {$value} <br />";
}

}

You can call myFunc() with no arguments or like myFunc('hello world', 'lorem ipsum', 'dolor sit amet').

BlogBuzz March 11, 2011

GluePHP — A Spartan URL Routing Framework

For larger PHP projects, it’s a good idea to use the Model-View-Controller pattern and URL routing to organize things a bit more logically and make the code easier to update in the future. Frameworks like CodeIgniter, Kohana and CakePHP do this, but they can…

User Submitted Posts Plugin for WordPress

Jeff Starr (co-author of Digging into WordPress) has released a new WordPress plugin for allowing users to submit guest posts to your blog. User Submitted Posts lets users write posts and upload images through a form embeddable in any page or post using a…

Cult of Mac Caught in Google Content Farm Crossfire

Google recently made some tweaks to their algorithm in order to penalize content farms, which create massive amounts of low-quality content tuned to rank well in Google. If you’ve ever run a search, looking for a solution to a problem, and found the SERP…

BlogBuzz March 5, 2011

Introducing App Recon

I recently launched a new blog, App Recon, where I will be reviewing iOS and Mac applications. If you’ve looked at the App Store lately, you’ve probably noticed just how vast it has become. You could easily spend an hour weeding through it, looking…

BlogBuzz February 26, 2011

Sparrow: The New Mail for Mac

If you’re a GMail user, you might like the idea of using a desktop client for your email, but can’t bear to give up the GMail way of doing things. That’s where the new Sparrow Mail app comes in. It’s a GMail-specific mail client…

TestFlight: iOS Beta Testing on the Fly

If you’ve ever tried a little iPhone development out, you might have run into an inconvenient problem. Apple uses a code signing system on iOS devices to ensure that software that ends up on them has either passed through the App Store (and has…