Hi In search of the definition for your question, I've came across an intersting Doc. Iam just giving here the snapshot of that.
In PHP terms, the toplevel directory would be the global namespace, and the pathname separator would be ->. Thus, the names $cart->items and $another_cart->items name two different variables. Note that the variable is named $cart->items, not $cart->$items, that is, a variable name in PHP has only a single dollar sign. The above para is stated in PHP Manual I done many tests on this operator, atlast I found that, its not only a dereferencing operator to access a variable or method, rather its a namespace seperator. We can create any hierarchy of name spaces with this op., on an object after creating it with 'new'. I'm still not clear about this. On Fri, 8 Mar 2002, Kearns, Terry wrote: > Because I'm not a hacker on the PHP engine, I don't really know but I also > saw this symbol when learning C++ recently. It is used in C++ as a shortcut > to dereferencing and accessing an objects properties/methods on objects > which are on the free store (heap). Normally C++ uses the dot operator to > access methods/properties (eg. "foo.do()"), but when the object needs to > first be dereferenced, then "foo->do()" can be used as a shortcut to > "(*foo).do()". > > Of course, this doesn't help you at all does it :) But I thought it was an > interesting connection to C++ and maybe hints at how PHP internally manages > objects. Perhaps it's just a coincidence. > > [TK] > > > -----Original Message----- > > From: S.Murali Krishna [mailto:[EMAIL PROTECTED]] > > Sent: Monday, 4 March 2002 9:48 PM > > To: Jack > > Cc: [EMAIL PROTECTED] > > Subject: Re: [PHP] What is "->" mean in php? > > > > > > > > If you have any Object Oriented Programming experience, then > > you may not had asked this. Its a operator to access methods, > > and variables inside a instance of a class , in which the > > variable before "->" is the instance of the class and the > > latter is a method or variable of that class. This is what I > > know, if you have any explanatory docs, pls let me know. > > > > > > > > On Mon, 4 Mar 2002, Jack wrote: > > > > > Dear all > > > There is one symbol in PHP that i always see is "->", could > > anyone pls > > > tell me what is this, and what does that do? Here is the > > statement i > > > saw could some pls explain what it means? > > > > > > if (!empty($row->usd_period) > > > > > > Thx a lot > > > Jack > > > [EMAIL PROTECTED] > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > <[EMAIL PROTECTED]> > > ------------------------------------------------------------------- > > We must use time wisely and forever realize that the time is > > always ripe to do right." > > > > -- Nelson Mandela > > ------------------------------------------------------------------- > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > <[EMAIL PROTECTED]> ------------------------------------------------------------------- We must use time wisely and forever realize that the time is always ripe to do right." -- Nelson Mandela ------------------------------------------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php