473,399 Members | 3,401 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,399 software developers and data experts.

php trivia: =>

Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name. I know that there has been a couple php-dev people
in here before, so maybe someone kind throw me a bone... ;)

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Sep 27 '05 #1
21 2632
Justin Koivisto wrote:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name. I know that there has been a couple php-dev people
in here before, so maybe someone kind throw me a bone... ;)


I know it as "assignment operator" but probably incorrectly.

Louise
Sep 27 '05 #2
boclair wrote:
Justin Koivisto wrote:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name. I know that there has been a couple php-dev people
in here before, so maybe someone kind throw me a bone... ;)


I know it as "assignment operator" but probably incorrectly.


The assignment operator would the just the = as in:

$a = 5;
"Variable a is assigned the integer value of five"

Almost everywhere I've seen it discussed it is simply referenced as:
"key => value" and is always typed out.

However, I guess it is sort of an assignment operator... Great now there
are 2 of them! ;)

It's not a big deal, just one of those curiosity things that starts to
annoy you late at night. That and I figured that it was about time I
asked a question here anyway...

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Sep 27 '05 #3
Good question. In the source code it's known as the double arrow. Not a
correct use of the term though.

Sep 27 '05 #4
I noticed that Message-ID: <g7********************@onvoy.com> from
Justin Koivisto contained the following:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name. I know that there has been a couple php-dev people
in here before, so maybe someone kind throw me a bone... ;)


I couldn't find out either so I decided to name it myself. I call it an
'andits' foreach ($key andits $value){... Geddit?

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Sep 27 '05 #5
Justin Koivisto schrieb:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name.

I never seen a name for it.
....mmmmmh, but if there is no name, i think we should find one for it.

-Kirsten
Sep 27 '05 #6
I noticed that Message-ID:
<1127804150.fa5fba4a665ee16af6fb52b194e3986e@teran ews> from Kirsten
contained the following:
I never seen a name for it.
...mmmmmh, but if there is no name, i think we should find one for it.

See my other post. I'm trying to popularise 'andits'

Could be my major contribution to the open source community :-)

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Sep 27 '05 #7
Geoff Berrow schrieb:
See my other post. I'm trying to popularise 'andits'

Could be my major contribution to the open source community :-)

Yes thats it, it's all in one word, let's send it to ZEND so they could
use it in their next PHP documentaion. :-)

-Kirsten
Sep 27 '05 #8
Geoff Berrow wrote:
I noticed that Message-ID: <g7********************@onvoy.com> from
Justin Koivisto contained the following:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name. I know that there has been a couple php-dev people
in here before, so maybe someone kind throw me a bone... ;)


I couldn't find out either so I decided to name it myself. I call it an
'andits' foreach ($key andits $value){... Geddit?


Now that's funny!

I've been calling the "indirect assignment operator" in the class notes
that I've been preparing, but wanted to see if there was an official name...

I think for now I will stick with what I have in the notes. I think that
naming an assignment operator in a way that could possibly be confused
with a logical operator would just be too confusing for newbies. ;)

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Sep 27 '05 #9
>I never seen a name for it.
...mmmmmh, but if there is no name, i think we should find one for it.


What's wrong with "equal to or greater than?"

Sep 27 '05 #10
ZeldorBlat wrote:
I never seen a name for it.
...mmmmmh, but if there is no name, i think we should find one for it.

What's wrong with "equal to or greater than?"


um... ya, that would be a comparison operator, and that is not what this
is...

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Sep 27 '05 #11
Justin Koivisto wrote:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name. I know that there has been a couple php-dev people
in here before, so maybe someone kind throw me a bone... ;)


OK, I've decided to call it "double arrow" as in the source code... Now
the php docs just need to be updated to give it the name so that is
searchable. Thanks to Chung and Chris Shiflett (off-list) on this one.

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Sep 27 '05 #12
I noticed that Message-ID: <2M********************@onvoy.com> from
Justin Koivisto contained the following:
I couldn't find out either so I decided to name it myself. I call it an
'andits' foreach ($key andits $value){... Geddit?


Now that's funny!

I've been calling the "indirect assignment operator" in the class notes
that I've been preparing, but wanted to see if there was an official name...

I think for now I will stick with what I have in the notes. I think that
naming an assignment operator in a way that could possibly be confused
with a logical operator would just be too confusing for newbies. ;)


Well I wouldn't stress the 'and' part but I see what you mean. However
I teach a beginners class and my students don't get confused (well they
get pretty confused with logical operators, but that's another story.

Double arrow? Nah, that does nothing. I think the best names at least
imply some meaning. I think I'll stick with 'andits'. :-)
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Sep 27 '05 #13
Geoff Berrow wrote:
I noticed that Message-ID: <2M********************@onvoy.com> from
Justin Koivisto contained the following:

I couldn't find out either so I decided to name it myself. I call it an
'andits' foreach ($key andits $value){... Geddit?


Now that's funny!

I've been calling the "indirect assignment operator" in the class notes
that I've been preparing, but wanted to see if there was an official name...

I think for now I will stick with what I have in the notes. I think that
naming an assignment operator in a way that could possibly be confused
with a logical operator would just be too confusing for newbies. ;)

Well I wouldn't stress the 'and' part but I see what you mean. However
I teach a beginners class and my students don't get confused (well they
get pretty confused with logical operators, but that's another story.

Double arrow? Nah, that does nothing. I think the best names at least
imply some meaning. I think I'll stick with 'andits'. :-)


Don't get me wrong, I like it, but IME catchy names like this don't
stick. Programmers seem to always fall back on the boring, simple ones. ;)

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Sep 27 '05 #14
I noticed that Message-ID: <BY********************@onvoy.com> from
Justin Koivisto contained the following:
Double arrow? Nah, that does nothing. I think the best names at least
imply some meaning. I think I'll stick with 'andits'. :-)


Don't get me wrong, I like it, but IME catchy names like this don't
stick. Programmers seem to always fall back on the boring, simple ones. ;)


Well there's pling...

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Sep 27 '05 #15
On Mon, 26 Sep 2005 19:30:20 -0500, Justin Koivisto <ju****@koivi.com> wrote:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name. I know that there has been a couple php-dev people
in here before, so maybe someone kind throw me a bone... ;)


In the parser's scanner it's T_DOUBLE_ARROW, so it's a double arrow.

andyh@server:/usr/src/php-5.1.0RC1/Zend$ grep -2 '=>' zend_language_scanner.l
}

<ST_IN_SCRIPTING>"=>" {
return T_DOUBLE_ARROW;
}
--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Sep 27 '05 #16
On Tue, 27 Sep 2005 08:55:43 +0200, with neither quill nor qualm,
Kirsten <K.*******@feuerwehr-meerbusch.de> quickly quoth:
Justin Koivisto schrieb:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name.

I never seen a name for it.
...mmmmmh, but if there is no name, i think we should find one for it.


Maybe that's why I'm having trouble wrapping my mind around classes.
I don't know the operator sign's name. ;)

How about "egrets" from Equal GREater-Than Sign ?

--
"Simplicity of life, even the barest, is not misery but
the very foundation of refinement." --William Morris
-----------------------------------
www.diversify.com Comprehensive Website Development
Sep 28 '05 #17
Justin Koivisto wrote:
Geoff Berrow wrote:
I noticed that Message-ID: <g7********************@onvoy.com> from
Justin Koivisto contained the following:

Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name. I know that there has been a couple php-dev people
in here before, so maybe someone kind throw me a bone... ;)


I couldn't find out either so I decided to name it myself. I call it an
'andits' foreach ($key andits $value){... Geddit?

Now that's funny!

I've been calling the "indirect assignment operator" in the class notes
that I've been preparing, but wanted to see if there was an official name...

Now this is like the Holy Roman Empire which was neither Holy nor Roman,
nor (in its later days) an Empire.

Whatever => is, it is not an operator (it's a bit of syntax like a comma
), does not denote assignment, and has not much to do with indirection.

Sklar's book (Learning PHP5) glosses it as 'key/value pair separator',
but only in the index as far as I can tell.

I rather like 'andits'

Colin
Sep 28 '05 #18
Larry Jaques schrieb:

Maybe that's why I'm having trouble wrapping my mind around classes.
I don't know the operator sign's name. ;)

How about "egrets" from Equal GREater-Than Sign ?

Thats nice, too.
Therefor we have now two suggestions:

-"andits"
-"egrets"
Anyone an other suggestion?

-Kirsten

P.S.: May be the reason why many people have trouble understanding
classes ;)
Sep 29 '05 #19
foreach($a as $k "y su" $v ){

}

as an english pun, it sounds acceptable, however, it would confuse
(even more) the non-hacker & the non-english speaking comunity outside
the US
, i for one, speak spanish, and the joke is not obvious at first
glance, so:

es => ' y su '
en => "and it's"

seriously, it doesnt really make that much sense,
and remember, u must take internationalization into consideration when
u name things like that, so u dont go the ms way:
i.e.
windows vista:
vista, in spanish means "view", (but you probably knew that)
however, in lativian, its another story
(http://www.activewin.com/awin/commen...ineIndex=30777)

quote:

In Latvian this one will be great : Windows Chicken (that's for
Latvian vista)

:end quote

im not fluent in lativian, nor i know where it is spoken, (europe?),
but i get this feeling that in the lativian speaking comunity, there is
going to be a lot of ppl migrating to linux in late 2006......
so, my suggestion:

=> (check man pages for perl =>, and just copy paste)

Sep 29 '05 #20
Larry Jaques wrote:
On Tue, 27 Sep 2005 08:55:43 +0200, with neither quill nor qualm,
Kirsten <K.*******@feuerwehr-meerbusch.de> quickly quoth:

Justin Koivisto schrieb:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name.
I never seen a name for it.
...mmmmmh, but if there is no name, i think we should find one for it.

Maybe that's why I'm having trouble wrapping my mind around classes.
I don't know the operator sign's name. ;)


=> is an array operator... The indirection operator (->) is used for
classes...
How about "egrets" from Equal GREater-Than Sign ?


Sounds like a bird to me... ;) Also you may not "regret" using it...

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Sep 29 '05 #21
On 2005-09-27 06:10:14 +0000, Geoff Berrow <bl******@ckdog.co.uk> said:
I noticed that Message-ID: <g7********************@onvoy.com> from
Justin Koivisto contained the following:
Does anyone know what the name of the => operator in PHP is? It is
something that is nearly impossible to search for, and I am not sure if
it even has a name. I know that there has been a couple php-dev people
in here before, so maybe someone kind throw me a bone... ;)


I couldn't find out either so I decided to name it myself. I call it an
'andits' foreach ($key andits $value){... Geddit?

How ab{oo}t simply calling it "implication". $key IMPLIES $value.
It even looks like mathematic symbol for implication...

--*
Seks, seksić, seksolatki...<uri: news:pl.soc.seks.moderowana >
Close to the middle of the network. We're*looking for a center.*
What if it turns out to be*hollow? We could be what is broken...
https://hyperreal.info | https://kanaba.info |=> "Szanuj Zieleń!"


Oct 1 '05 #22

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

Similar topics

1
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
0
by: Arne Schirmacher | last post by:
I want to display a MySQL database field that can contain HTML markup. If I use <esql:get-string> then I get all of the database field, but all tags are escaped which is not what I want. If I use...
34
by: Mark Moore | last post by:
It looks like there's a pretty serious CSS bug in IE6 (v6.0.2800.1106). The HTML below is validated STRICT HTML 4.01 and renders as I would expect in Opera, FrontPage, and Netscape. For some...
2
by: Tim Simmons | last post by:
I am stumped. I encoded the action = of my form using GET and I can't seem to get the property/value stuff from it using a JavaScript script I got from the web. I want to create a trivia game...
11
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom,...
2
by: bissatch | last post by:
Hi, I am currently writing a simple PHP program that uses an XML file to output rows for a 'Whats New' page. Once written, I will only require updating the XML file and any pages that use the...
0
by: vdex42 | last post by:
Apologies if this has been asked before, but I haven't been able to find the answer to this yet: My problem is that .NET will not allow me to insert escaped '>' characters (i.e. &gt;) within the...
5
by: alesitaam | last post by:
Help!!!! Im new using python, currently writing a program which tests one game, IQ test. When the module is run, the program should ask user to choose the game to start. Also, I'm using Try...Except...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.