WP_Error vs PHP Exceptions in WordPress

So today, I instigated a lively discussion on the topic of WP_Error vs PHP Exceptions. I’m curious why try/catch exceptions are rarely used in WP dev? Any insight? — Justin Sternberg (@Jtsternberg) April 2, 2015 A great deal… Read More

A function timer… function

Handy function that calculates your function/method execution time so you can optimize your code’s performance.

Using Class Autoloaders (in WordPress?!)

The other day, I tweeted out that I believe there is hesitancy in the WordPress world to use autoloaders. Don’t believe me? I feel like there’s hesitancy in the WP world w/ autoloaders. spl_autoload_register is your friend. Namespaces… Read More

Gary Jones’ Recommended Resources on Avoiding Singletons

The Clean Code Talks – “Global State and Singletons” Why Singletons have no use in PHP Testing Code That Uses Singletons Making Singletons Safe in PHP The “Missing” Patterns of the PHP Manual — Singleton Why Singletons are… Read More

A print_r() or var_dump() replacement that expands the variable into valid PHP code.

Occasionally you want to expand an object or array variable to see what it contains. Typically we would use a variation of print_r() or var_dump() to do this, but the down side is there is no way simple way… Read More

Sublime Text WordPress Debugging Snippets

Debugging, if not THE top, is close to the top of a web developer’s activities. That being the case I think every developer should have a personalized and custom set of debugging tools at their disposal to make… Read More

Primer On Globals, PHP, Classes. or OOP.

What the OOP is a PHP Class?