Problem With Constructors With Parameters In PHP
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?
Its __construct()
class MyClass {
function __construct($A,$B,$C) {
echo("$A $B $C");
}
}
$MC=new MyClass('Hello','World','!');
http://us2.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor
精彩评论