要初始化object变量,您使用下面例子中所示的申明方法:
class foo {
function do_foo () {
echo "doing foo.";
}
}
$bar = new foo;
$bar -> do_foo ();
要初始化object变量,您使用下面例子中所示的申明方法:
class foo {
function do_foo () {
echo "doing foo.";
}
}
$bar = new foo;
$bar -> do_foo ();