i'm new to php .. so dont know about these extensions mentions above .. but recently i saw a method to overload function in php (sort of) ..
traditional function overloading is not supported in php because you can not have multiple functions with same name in php .. but you can use one single function which can take multiple arguments .. known as Variadic Function (http://en.wikipedia.org/wiki/Variadic_function)
function show()
{
$data = "";
$arr = func_get_args(); //Returns an Array of arguments passed
for($a = 0 ; $a < func_num_args() ; $a++ ) // func_num_args returns number of arguments passed .. you can also use count($arr) here
{
$data .= $arr[$a];
}
echo $data, "<br>";
}
show("Hey","Hii","Hello");
show("How Are You");
here .. i have passed variable arguments to a function and appended each of them in a string ..
ofcourse including a string is not necessary .. you can simply echo $arr array contents inside a loop .. hope that helps .. !!