473,322 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Meaning of "->"

Hi,

I'm studying some validation code and I can't figure out the meaning of
"->"
in the following context:
-------------------
function addCheck($field){
$this->mandatory[] = $field;
}

function addCheckEmail($field){
$this->mandatory_mail[] = $field;
^
....
-------------------

I've spent a good amount of time trying to search for information or
similar code on it without success and unfortunately I've lost where I
got the code from; dumb move, I know!

Is "$this->mandatory[] " simply a variable name? There are
several variations in the code ( "$this->mandatory_whatever[]" ), but
the format is strange to me, causing me to wonder if there is more to it
than "just a variable name".
I've had no definitive luck sandboxing it either.

Thanks for any light you can shed for this rank newbie<g>,

Twayne


Jun 27 '08 #1
3 1220
On Wed, 18 Jun 2008 19:22:44 +0200, Twayne <no****@devnull.spamcop.net
wrote:
Hi,

I'm studying some validation code and I can't figure out the meaning of
"->"
in the following context:
-------------------
function addCheck($field){
$this->mandatory[] = $field;
}

function addCheckEmail($field){
$this->mandatory_mail[] = $field;
^
...
-------------------

I've spent a good amount of time trying to search for information or
similar code on it without success and unfortunately I've lost where I
got the code from; dumb move, I know!

Is "$this->mandatory[] " simply a variable name? There are
several variations in the code ( "$this->mandatory_whatever[]" ), but
the format is strange to me, causing me to wonder if there is more to it
than "just a variable name".
I've had no definitive luck sandboxing it either.

Thanks for any light you can shed for this rank newbie<g>,
Start here:
http://nl.php.net/manual/en/language.oop5.php
--
Rik Wasmus
....spamrun finished
Jun 27 '08 #2
Twayne wrote:
I'm studying some validation code and I can't figure out the meaning of
"->"
It's the object resolution operator. Please read the PHP manual, chapter
about OOP.

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Delay not, Caesar. Read it instantly.
-- Shakespeare, "Julius Caesar" 3,1

Here is a letter, read it at your leisure.
-- Shakespeare, "Merchant of Venice" 5,1

[Quoted in "VMS Internals and Data Structures", V4.4, when
referring to I/O system services.]

Jun 27 '08 #3
Twayne wrote:
>
>I'm studying some validation code and I can't figure out the meaning
of "->"

It's the object resolution operator. Please read the PHP manual,
chapter about OOP.
Ahh, some words to use for searches! Thanks Ivan, I think I looked
about everywhere but OOP.

Regards,

Twayne
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

68
by: Marco Bubke | last post by:
Hi I have read some mail on the dev mailing list about PEP 318 and find the new Syntax really ugly. def foo(x, y): pass I call this foo(1, 2), this isn't really intuitive to me! Also I...
0
by: lezah | last post by:
what is the meaning "latch" in the shared pool and library cache?
38
by: Haines Brown | last post by:
I'm having trouble finding the character entity for the French abbreviation for "number" (capital N followed by a small supercript o, period). My references are not listing it. Where would I...
53
by: Alf P. Steinbach | last post by:
So, I got the itch to write something more... I apologize for not doing more on the attempted "Correct C++ Tutorial" earlier, but there were reasons. This is an UNFINISHED and RAW document,...
388
by: maniac | last post by:
Hey guys, I'm new here, just a simple question. I'm learning to Program in C, and I was recommended a book called, "Mastering C Pointers", just asking if any of you have read it, and if it's...
18
by: DaveLessnau | last post by:
I'm trying to learn C on my own and, apparently, my brain went on vacation somewhere. I just can't figure out how to parse the following function call: "void fillDeck( Card * const wDeck, const...
33
by: baumann.Pan | last post by:
hi all, i want to get the address of buf, which defined as char buf = "abcde"; so can call strsep(address of buf, pointer to token);
13
by: Kurda Yon | last post by:
Hi, I found one example which defines the addition of two vectors as a method of a class. It looks like that: class Vector: def __add__(self, other): data = for j in range(len(self.data)):...
15
by: David C. Ullrich | last post by:
Luckily I tried it before saying no, that's not how "in" works: True False Is there a reason for the inconsistency? I would have thought "in" would check for elements of a sequence,...
15
by: =?ISO-8859-15?Q?L=E9na=EFc?= Huard | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all, For some reasons, somewhere in a program, I'd like, if possible, to quickly parse a whole file before rewinding it and letting the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.