Extend PHP error_log() Functionality

Throughout development many of us use the built-in error_log() function quite a bit. I know I sure do when I am debugging models, controllers, and the such but don't you hate it when you want to write the contents of an array or object to the error log? The error_log() function only accepts a string parameter so we have to use a little trick when we want to output array/object contents. We can accomplish this using only a few lines of code:

While this is nothing ground breaking, it's certainly a handy trick when you are trying to debug code that deals with arrays and objects.

The World In Links [9/12-9/18/2011] -- Gaming, HTML5, Ruby

The World In Links by Nicholas Kreidberg Blogging: How to start earning money from your blog.

Database: 5 steps to scaling any database.

Gaming: Play almost any Apple II or IIgs game in your browser.

HTML5: Mastering HTML5 prefetching.

iOS: A video tutorial on the MVC approach to iOS development.

Node.js: Useful tools, tutorials and resources.

Photography: Water photo manipulation showcase.

Ruby: The best way to learn Rails.

TextMate: Snippets video tutorial.

WordPress: 25 free plugins for multi-author blogs.

The World In Links [2/21-2/27]

Chrome: 10 tips and tricks for Google Chrome.
Design: Free textures to spice up your creativity.

Development: The HTML5 technical specification strictly for web developers.

GitHub: Several gists added/updated.

HTML5: A collection of tutorials and techniques that will keep you busy.

PHP: Create a tiny MVC boilerplate for small projects that don't require a full blown framework.

Plugin: Simple Lightbox for WordPress is a great plugin for handling both single images and image galleries.

WordPress: 11 plugins every body should have.