Jump to content


Photo

what does this symbol mean?


  • Please log in to reply
2 replies to this topic

#1 tauchai

tauchai
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 17 May 2006 - 01:28 PM

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.

#2 samshel

samshel
  • Members
  • PipPipPip
  • Advanced Member
  • 837 posts

Posted 17 May 2006 - 01:32 PM

$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
Cheers,
SamShel
-----------------------------------------------
--: FUTURE IS LINUX :--
-----------------------------------------------

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 17 May 2006 - 04:19 PM

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 samshel mentioned above.

-> is not the same as =>

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users