I have 2 cases. Case 1: pass the name and age. Case 2: pass name and gender. How can I do this? class User { function __construct($name=NULL, $gender=NULL, $age=NULL) { … } } //…
I have 2 cases. Case 1: pass the name and age. Case 2: pass name and gender. How can I do this? class User { function __construct($name=NULL, $gender=NULL, $age=NULL) { … } } //…