Jump to content

Recommended Posts

It's used to access things in a class
example:
[code]
class class_name
{
$number=5;
$foo=6;
$bar="hello";

function bar()
{
echo $this->number;
echo $this->foo;
echo $this->bar;
}
}

$thingy=new class_name;

echo $thingy->number; // will output 5
echo $thingy->foo; //will output 6
echo $thingy->bar; //will output 'hello'

$thingy->bar(); will output the same thing as above
[/code]
Link to comment
https://forums.phpfreaks.com/topic/28197-what-is/#findComment-128977
Share on other sites

[quote author=ProjectFear link=topic=116002.msg472476#msg472476 date=1164262621]
i think a mod or something should make a sticky thread because this question has been asked a lot lately.
[/quote]

There is an FAQ thread in the [url=http://=http://www.phpfreaks.com/forums/index.php/board,41.0.html]FAQ/Code Snippet Repository]=http://www.phpfreaks.com/forums/index.php/board,41.0.html]FAQ/Code Snippet Repository[/url] forum made by me.
Link to comment
https://forums.phpfreaks.com/topic/28197-what-is/#findComment-129211
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.