Can I overload methods in PHP?

cr4zyguy

New Member
Example:I want to have two different constructors, and I don't want to use func_get_arg(), because then it's invisible what args are possible.Is it legal to write two of them, like:\[code\]class MyClass { public function __construct() { // do something } public function __construct(array $arg) { // do something }}\[/code\]?
 
Back
Top