Reputation: 6853
class MyClass {
function __constructor($A,$B,$C) {
echo("$A $B $C");
}
}
$MC=new MyClass('Hello','World','!');
My parameters don't seem to be making it through to the constructor... Am I doing this wrong?
Upvotes: 0
Views: 128
Reputation: 61587
Its __construct()
class MyClass {
function __construct($A,$B,$C) {
echo("$A $B $C");
}
}
$MC=new MyClass('Hello','World','!');
https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor
Upvotes: 5