I am having trouble with naming the function. I have a class and I need 2 functions something like below.
class myclass { public function tempclass () { echo "default"; } public function tempclass ( $text ) { echo $text; } } When I call
tempclass('testing'); // ( called after creating the object ) function tempclass() is being called how can i have 2 functions with same name but different parameters?