Re: PHP 4.3.11, question about classes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris! Thanks for all the great answers, I really appreciate all of your help. I am browsing the link you gave me now.

I only have one question:

On Mar 22, 2006, at 4:09 AM, chris smith wrote:
You're calling a method (which is a function inside a class). You
can't call a regular function without the brackets, so methods should
be the same.

...

class testing {
        var $what;
}

$linkGenClass = new testing();
$linkGenClass->what = 'hi';
echo $linkGenClass->what;

Let me see if I have this straight: "class testing {}" is a method, and "$linkGenClass = new testing();" is the class...

I am pretty familiar with PHP functions... I was under the assumption that "class testing{}" was the class, and any functions inside that class were the methods?

An example function:

function example() {}

But, this would be considered a method?:

class method {}

Seems a bit confusing. Esp. when I construct the above method like so: "$myClass = new method();"

Hehe, I am sure that link you sent will give me some great answers, reading now.

I really appreciate your time/links/knowledge/help.   :)

Cheers,
Micky

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux