[thelist] OO PHP

Jon Haworth evolt at laughing-buddha.net
Sat Mar 2 07:26:00 CST 2002


Hi Bill,

> Whenever I declare a class, the functions
> and instance variables seem to have no effect
> on the code where I instantiated the new
> object.

You should be able to do

class foo {
    function hw () {
        echo "hello world!";
    }
}
$test = new foo;
$test->hw();

and have "hello world" displayed on the screen. Is this not what's
happening?

> Does any one have any suggestions or links to look at?

The manual is OK: http://www.php.net/manual/en/language.oop.php


Cheers
Jon





More information about the thelist mailing list