if a build a class and i want to make 3 constructor:
1rt constructor: take one argument
2nd constructor: take 2 argument
3rd constructor: take 3 argument
and i want the first constructor to call the constructor 3
and i want the second constructor to call the constructor 3 too.
someting like this:
class User
{
...
public function User($UserID) : this->($UserID, NULL, NULL);
public function User($UserID, $UserName) : this->($UserID, $UserName, NULL);
public function User($UserID, $UserName, $Adress)
{
....
}
how do i do something like this in php5, i was looking for documentation on this and still looking for it 🙁
And what about using "public function __construct" for multiple constructor?
Can someone help me with the syntax using multiple constructor in php5?
I would realy appreciate.
thx guys