SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    May 2002
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    what is this symbol ?

    sorry for the silly question ...

    but what are these symbols for ..

    if this symbole -> is the seperator between the pointer (this) and the variable name in a class (hope i am right!), so what is this => ?

    of course this >= is bigger than or equal to sign.


  2. #2
    SitePoint Zealot jgreen's Avatar
    Join Date
    Apr 2003
    Location
    everywhere and nowhere
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    -> is used to reference object methods and members
    see this article for more: http://www.sitepoint.com/article/662

    => equal to or greater than, a comparison operator
    >= another way of saying the above more info on these can be found here:http://www.php.net/manual/en/language.operators.php

  3. #3
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    as far as I know => is not equal to or greater than, it is just the operator for associative arrays.

    array('key1' => 'content');

    or foreach ($array as $key => $content).
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  4. #4
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This might help you get your head round these symbols

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  5. #5
    SitePoint Member
    Join Date
    May 2002
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you jgreen,
    Thank you cyborg from dh,

    I would say,
    -> This is used to reference object methods and members.
    => This is an operator for associative arrays. (cannot be 'greater than or equal to' sign.)
    >= This is the 'greater than or equal to' sign.
    Last edited by ReaderMan; Apr 18, 2003 at 07:19.

  6. #6
    SitePoint Member
    Join Date
    May 2002
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you seanf,

    what confuses is => and >=, sometimes when reading another code.

  7. #7
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    => and >= is simple mathematical comparison operators. Means Greater than or equal to.
    Aaron Brazell
    Technosailor



  8. #8
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sketch
    => and >= is simple mathematical comparison operators. Means Greater than or equal to.
    I don't think => or =< are valid comparison operators. I just tried each as comparison operators and both yielded a parse error.

    <= is the correct less-than or equal-to operator
    >= is the correct greater-than or equal-to operator
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  9. #9
    SitePoint Member
    Join Date
    May 2002
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    >= This is the ONLY symbol means greater or equal to.

    => This is NEVER a greater or equal to. I tested it as a comparison operator and it gives a T_DOUBLE_ARROW error which means it is just for arrays.

  10. #10
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    => Is not greater-than or equal to.

    =< means nothing in PHP, I believe.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •