Jump to content

Archived

This topic is now archived and is closed to further replies.

tauchai

what does this symbol mean?

Recommended Posts

if(!$sec->isLoggedIn())
{
header ("location: ../login.php");
exit();
}

wat does this symbol means in PHP coding ? -> is it an aray or wat?

-> same with => or not?

anyone know plz reply. thxs a lot.

Share this post


Link to post
Share on other sites
$sec is an object of a class and isLoggedIn() is the member function of that class.

-> is used to call a member functions of a class using its object. U can also reference a member variable of a class using this.

hth

Share this post


Link to post
Share on other sites
The -> is an operator used when doing OOP (Object Oriented Programming) in PHP. It allows you to call functions/variables from within a class as [b]samshel[/b] mentioned above.

-> is not the same as =>

=> is used when assigning indexes/keys within an array.

Share this post


Link to post
Share on other sites

×

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.