Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 33
  1. #21
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Hypertext View Post
    Caleb correct me if I'm wrong, isn't it bad to have spacing like

    $_GET ["var"]

    Between the T and square left bracket? I don't know...

    I think we should try and conform to pear.php.net's standards, they are quite good. I'm sick of everybody adding whitespace and parenthesis EVERYWHERE to make it look 'pretty'..

    Whitespace and unecessary characters should only be used where it makes it easier to read, and less to type, IMO.
    And I'm sick of your attitude. You have to understand Charlie that people have coding preferences, just because they may not be the same of yours there is no need to complain?
    Back for a while.

  2. #22
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    No, he's just acting like he knows something.. and is trying to "outsmart me" and tell me the "correct" way to do things.

    Yet at the beginning of this year, had had a Habbo JPEG avatar, didn't know a lick of PHP, and liked to "test divs".

  3. #23
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    I just want to say something to Charlie.

    Just because someone uses
    PHP Code:
    echo "hi"
    Or someone else uses
    PHP Code:
    echo 'hi'
    Or another person uses
    PHP Code:
    echo ("hi"); 
    It still works, there isn't any need to bang on about parenthesis or pretty code, you need to learn to respect that people have very different methods of coding and people always will. I would understand if the methods didn't work or absolutely killed loading times but they don't.

    @denta, lol.
    Back for a while.

  4. #24
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Well there really is no point in doing:

    PHP Code:
    echo 'hello ' $name ' yeah so here is the motd: ' $motd ' cause today is ' $date ' yeah so k.'
    when you could just do:

    PHP Code:
    echo "hello {$name} yeah so here is the motd: {$motd} cause today is {$date}"

  5. #25
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    Well there really is no point in doing:

    PHP Code:
    echo 'hello ' $name ' yeah so here is the motd: ' $motd ' cause today is ' $date ' yeah so k.'
    when you could just do:

    PHP Code:
    echo "hello {$name} yeah so here is the motd: {$motd} cause today is {$date}"
    Yeah I know but there is some strange coders out there that would probably prefer that Everyone needs to respect it though.
    Back for a while.

  6. #26
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Not really, if you do it the way like I said.. it's wasting time.. and giving PHP to hard of a time.

    '' was really invented for short phrases and short strings with no variables. Hence the reason in C languages it's max char range is 3.

  7. #27
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    Well there really is no point in doing:

    PHP Code:
    echo 'hello ' $name ' yeah so here is the motd: ' $motd ' cause today is ' $date ' yeah so k.'
    when you could just do:

    PHP Code:
    echo "hello {$name} yeah so here is the motd: {$motd} cause today is {$date}"
    I feel like being an *******:

    Well there really is no point in doing:

    PHP Code:
    echo "hello {$name} yeah so here is the motd: {$motd} cause today is {$date}"
    when you could just do:

    PHP Code:
    echo "hello $name yeah so here is the motd: $motd cause today is $date"
    More to the point coding preference can be bad. Using parenthesis or wrong quotes in any script can and has been proven and has legitimate reasons to slow it down.

    Dentafrice, is that built into ZDE?
    How could this hapen to meeeeeeeeeeeeeee?lol.

  8. #28
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    and I do this

    echo( 'I rather do this, cause ' . $im_awesome . ' and thats that.' );

    OMG PARENTHESIS' OMG MURDERR REIGGNZ JA RULLE my neg
    Hi, names James. I am a web developer.

  9. #29
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    phpDoc is a documenter for PHP. I don't see what this has to do with code formatting?

    Quote Originally Posted by Dentafrice View Post
    I don't type the spaces, I don't type any of the formatting.

    I have a nice little too called Ctrl+Shift+F which does it all for me, to phpDoc standards.. which are highly acceptable

    pear's standards are laughed at, and are only used for pear repository coding, not a standard for coding.

  10. #30
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Tomm View Post
    phpDoc is a documenter for PHP. I don't see what this has to do with code formatting?
    Precisely, I've just been looking through this thread trying to come up with something to say which will shut everyone up.

    Coding PHP has a lot of preference mixed into it, whether you want to use () or not, " or ', they all have their uses and it's all preference. There is no right or wrong, nor is there with indenting, so stop bloody going on about it. The only benefit with using " against ' and () against none is the speed would be increased if you were coding on a server with heavy traffic. Which none of you in this thread do. (Unless Invent has posted).


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

Page 3 of 4 FirstFirst 1234 LastLast

Posting Permissions

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