Ever needed to call the same function with different number of parameters? Easy right, just use default values:
-
function tryMe($param1, $param2 = NULL, $param3 = NULL) { … }
But what if you want to make the first parameter optional?
Here’s a simple technique for doing so it in a transparent way.
(more…)