do_foo (); "/> do_foo (); ">
Home > Backend Development > PHP Tutorial > 初始化object(对象)变量_PHP

初始化object(对象)变量_PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 12:39:36
Original
1532 people have browsed it

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

class foo {

function do_foo () {

echo "Doing foo.";

}

}

$bar = new foo;

$bar -> do_foo ();

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template