do_foo (); "/> do_foo (); ">

首页 >后端开发 >php教程 >初始化object(对象)变量_PHP

初始化object(对象)变量_PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-01 12:39:361499浏览

要初始化object变量,您使用下面例子中所示的申明方法:

class foo {

function do_foo () {

echo "Doing foo.";

}

}

$bar = new foo;

$bar -> do_foo ();

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn