Is function overloading possible in php.If yes, then how and if not then why?
Thanks in advance.
I have checked the php manual which gives solution to overloading as mail() function can be overloaded by mb_mail() function .
But is this the proper way for overloading
No. Because it has not been implemented. There’s a PECL extension that allows you to do this, but it makes your code not portable to environments where this extension is not available.
Don’t ask why it has not been implemented.
Since PHP 5.3 you can use namespaces for ‘kind of’ overloading