php trivia: =>

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Justin Koivisto

    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 - justin@koivi.co m

  • boclair

    #2
    Re: php trivia: =>

    Justin Koivisto wrote:[color=blue]
    > 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... ;)
    >[/color]

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

    Louise

    Comment

    • Justin Koivisto

      #3
      Re: php trivia: =>

      boclair wrote:
      [color=blue]
      > Justin Koivisto wrote:
      >[color=green]
      >> 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... ;)
      >>[/color]
      >
      > I know it as "assignment operator" but probably incorrectly.[/color]

      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 - justin@koivi.co m

      Comment

      • Chung Leong

        #4
        Re: php trivia: =>

        Good question. In the source code it's known as the double arrow. Not a
        correct use of the term though.

        Comment

        • Geoff Berrow

          #5
          Re: php trivia: =>

          I noticed that Message-ID: <g7adnSZjsrQAD6 XeRVn-tw@onvoy.com> from
          Justin Koivisto contained the following:
          [color=blue]
          >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... ;)[/color]

          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/

          Comment

          • Kirsten

            #6
            Re: php trivia: =&gt;

            Justin Koivisto schrieb:[color=blue]
            > 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.[/color]
            I never seen a name for it.
            ....mmmmmh, but if there is no name, i think we should find one for it.

            -Kirsten

            Comment

            • Geoff Berrow

              #7
              Re: php trivia: =&gt;

              I noticed that Message-ID:
              <1127804150.fa5 fba4a665ee16af6 fb52b194e3986e@ teranews> from Kirsten
              contained the following:
              [color=blue]
              >I never seen a name for it.
              >...mmmmmh, but if there is no name, i think we should find one for it.[/color]
              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/

              Comment

              • Kirsten

                #8
                Re: php trivia: =&gt;

                Geoff Berrow schrieb:[color=blue]
                > See my other post. I'm trying to popularise 'andits'
                >
                > Could be my major contribution to the open source community :-)
                >[/color]
                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

                Comment

                • Justin Koivisto

                  #9
                  Re: php trivia: =&gt;

                  Geoff Berrow wrote:[color=blue]
                  > I noticed that Message-ID: <g7adnSZjsrQAD6 XeRVn-tw@onvoy.com> from
                  > Justin Koivisto contained the following:
                  >[color=green]
                  >>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... ;)[/color]
                  >
                  > I couldn't find out either so I decided to name it myself. I call it an
                  > 'andits' foreach ($key andits $value){... Geddit?[/color]

                  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 - justin@koivi.co m

                  Comment

                  • ZeldorBlat

                    #10
                    Re: php trivia: =&gt;

                    >I never seen a name for it.[color=blue]
                    >...mmmmmh, but if there is no name, i think we should find one for it.[/color]

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

                    Comment

                    • Justin Koivisto

                      #11
                      Re: php trivia: =&gt;

                      ZeldorBlat wrote:
                      [color=blue][color=green]
                      >>I never seen a name for it.
                      >>...mmmmmh, but if there is no name, i think we should find one for it.[/color]
                      >
                      >
                      > What's wrong with "equal to or greater than?"
                      >[/color]

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

                      --
                      Justin Koivisto, ZCE - justin@koivi.co m

                      Comment

                      • Justin Koivisto

                        #12
                        Re: php trivia: =&gt;

                        Justin Koivisto wrote:
                        [color=blue]
                        > 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... ;)
                        >[/color]

                        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 - justin@koivi.co m

                        Comment

                        • Geoff Berrow

                          #13
                          Re: php trivia: =&gt;

                          I noticed that Message-ID: <2MGdnTpp5aFtpK TeRVn-iA@onvoy.com> from
                          Justin Koivisto contained the following:
                          [color=blue][color=green]
                          >> I couldn't find out either so I decided to name it myself. I call it an
                          >> 'andits' foreach ($key andits $value){... Geddit?[/color]
                          >
                          >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. ;)[/color]

                          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/

                          Comment

                          • Justin Koivisto

                            #14
                            Re: php trivia: =&gt;

                            Geoff Berrow wrote:
                            [color=blue]
                            > I noticed that Message-ID: <2MGdnTpp5aFtpK TeRVn-iA@onvoy.com> from
                            > Justin Koivisto contained the following:
                            >
                            >[color=green][color=darkred]
                            >>>I couldn't find out either so I decided to name it myself. I call it an
                            >>>'andits' foreach ($key andits $value){... Geddit?[/color]
                            >>
                            >>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. ;)[/color]
                            >
                            >
                            > 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'. :-)[/color]

                            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 - justin@koivi.co m

                            Comment

                            • Geoff Berrow

                              #15
                              Re: php trivia: =&gt;

                              I noticed that Message-ID: <BY-dncGz7qbO7KTeRV n-hQ@onvoy.com> from
                              Justin Koivisto contained the following:
                              [color=blue][color=green]
                              >> Double arrow? Nah, that does nothing. I think the best names at least
                              >> imply some meaning. I think I'll stick with 'andits'. :-)[/color]
                              >
                              >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. ;)[/color]

                              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/

                              Comment

                              Working...