Документ взят из кэша поисковой машины. Адрес оригинального документа : http://old.master.cmc.msu.ru/php/language.types.object.html
Дата изменения: Sun Feb 3 22:33:24 2002
Дата индексирования: Tue Oct 2 07:13:48 2012
Кодировка:
Objects

Objects

Object Initialization

To initialize an object, you use the new statement to instantiate the object to a variable.

<?php
class foo
{
    function do_foo()
    {
        echo "Doing foo."; 
    }
}

$bar = new foo;
$bar->do_foo();
?>

For a full discussion, please read the section Classes and Objects.