Page 2 of 5 FirstFirst 12345 LastLast
Results 11 to 20 of 44
  1. #11
    Join Date
    Nov 2006
    Location
    Narrich
    Posts
    5,687
    Tokens
    0
    Habbo
    Jamesy...

    Latest Awards:

    Default

    Quote Originally Posted by Iszak View Post
    Dan, grow the **** up - I don't know if it's just me, but I'm sick of your constant trolling, and pointless threads that seem as if they're just to get "praised" for a few hours of work.

    Don't bother replying to this, because I'm never going to reply to you again.
    I don't think its trolling by giving information straight and to the point in a way that anyone can understand.
    Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/

  2. #12
    Join Date
    Apr 2009
    Location
    United Kingdom
    Posts
    1,111
    Tokens
    100

    Latest Awards:

    Default

    Quote Originally Posted by Jamesy View Post
    I don't think its trolling by giving information straight and to the point in a way that anyone can understand.
    I think Iszak meant like the KP preview dan posted aswell etc.

  3. #13
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    Quote Originally Posted by Jamesy View Post
    I don't think its trolling by giving information straight and to the point in a way that anyone can understand.
    But when it's infomation thats;

    1) So simple anyone with a single brain cell knows it.
    or
    2) Wrong.


  4. #14
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by Jewish Bear View Post
    1) security comes before performance in all aspects of programming, php or not
    Totally disagree, some times performance is far more important. The balance between performance and security is important to get right and can only ever be judged on a case by case basis.

    2) learn to love () ? : (ternary operator)
    3) use "and" and "or" instead of && and ||, much easier to read and understand, does exactly the same thing
    Kinda a contradiction, Ternary operators are often harder to read that simple if's or cases. On the flipside id say && or || is actually easier to read than writing the word "/

    4) never use $_REQUEST, very easy to forge things
    True, no real reason to ever use it ether
    5) "" and '' perform the same, stop being eejits and saying one performs faster than the other, they don't any more, use either
    Very wrong, they perform two different actions and '' is upto a factor of 4 faster... Double quotes include parsing of variables within it, single quotes just passes a string o.0

    6) use , instead of . in echo, it's faster
    The speed saved here would be lost totally by taking your advice above?

    7) use echo instead of print unless you want to hang on to the variable, it's faster
    Print is often faster?
    8) use cookies instead of sessions unless you specifically need sessions
    Sessions are more secure + store more data and data-types than cookies are capable of ?
    9) use strstr instead of foreach / for loop for replacing things
    Or use somthing that replaces strings like str_replace?

    ... Whut?

    Quote Originally Posted by Devestation View Post
    Wow dan, not much more to teach someone in 10 seconds now is there?
    Thanks for these tips - They'll help with my PHP skills.
    No... it really wont, almost all of it was dead wrong?

    Quote Originally Posted by Jewish Bear View Post
    0.007 over 100,000 loops is not faster in a real-world situation.
    Yea as dealing with huge amounts of data is a thing a company would never ever come across in the real world (much larger than a 100,000)... What planet did you say you were from?

    Quote Originally Posted by Jamesy View Post
    I don't think its trolling by giving information straight and to the point in a way that anyone can understand.
    Seeing as its mostly totally wrong, i think its probably worse than most trolling as people are actually believing it

    Comic book guy: Worst php tutorial.. ever
    Last edited by Mentor; 21-07-2009 at 08:58 PM.

  5. #15
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Quote Originally Posted by Iszak View Post
    Dan, grow the **** up - I don't know if it's just me, but I'm sick of your constant trolling, and pointless threads that seem as if they're just to get "praised" for a few hours of work.

    Don't bother replying to this, because I'm never going to reply to you again.
    Says you... the person who likes and loves to argue about anything and everything PHP/html/ruby/js (the list can go on).

    Anyway, these tips are very helpful for the people just learning PHP... and even more advanced members.

  6. #16
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by Source View Post
    Says you... the person who likes and loves to argue about anything and everything PHP/html/ruby/js (the list can go on).

    Anyway, these tips are very helpful for the people just learning PHP... and even more advanced members.
    If by learn php, you mean fail at then yes? These tips are almost all wrong, and whats not is essentially useless common sense. Anyone other than a total php noob who cant see this is seriously over estimating there php skills.. Why are people defending these tips? has no one actually read them?

    Also, ad hominem really isn't helpful, hes right whether or not you like him and whether or not he likes to argue. Facts stay the same regardless of who's telling you them...

  7. #17
    Join Date
    Apr 2009
    Location
    United Kingdom
    Posts
    1,111
    Tokens
    100

    Latest Awards:

    Default

    Dan, you didn't say anything about <? being faster than <?php
    ...

    @thybag It's just his personal prefs he's posted saying they are tips rly
    Last edited by BoyBetterKnow; 21-07-2009 at 09:05 PM.

  8. #18
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Mentor View Post
    Totally disagree, some times performance is far more important. The balance between performance and security is important to get right and can only ever be judged on a case by case basis.
    This "balance" you speak of is nothing but a scapegoat for coders to get out of ******* up, if you have a gigantic database and someone strolls in there and deletes everything because you made this little bit of code faster by removing a check, you're gonna be enjoying hours of work restoring backups. There is no balance, security always comes before performance, if you can't get it to perform fast enough with the security, throw more servers at it.

    Quote Originally Posted by Mentor View Post
    Kinda a contradiction, Ternary operators are often harder to read that simple if's or cases. On the flipside id say && or || is actually easier to read than writing the word "/
    I never said they were easy to read, I find them to be better than simple if/else statements, personal opinion there. I said or/and is easier to read, and it is, if you get an average joe and slap them && || "and" or "or", which are they going to understand without any coding/programming experience? (hint: it's and/or)


    Quote Originally Posted by Mentor View Post
    Very wrong, they perform two different actions and '' is upto a factor of 4 faster... Double quotes include parsing of variables within it, single quotes just passes a string o.0
    Maybe at php 4.3 sure, but not with php 5 + 4.3 (i think it's 4.3, don't quote me on it), the performance differential is completely eliminated.


    Quote Originally Posted by Mentor View Post
    The speed saved here would be lost totally by taking your advice above?
    question is answered above


    Quote Originally Posted by Mentor View Post
    Print is often faster?
    print is never faster as it has to return after it's done (always returns 1)

    Quote Originally Posted by Mentor View Post
    Sessions are more secure + store more data and data-types than cookies are capable of ?
    data types in php are stupid and always have been, the only reason you ever need data type storage in php is for strict comparisons, strings are fine for everything in a real-world situation


    Quote Originally Posted by Mentor View Post
    Or use somthing that replaces strings like str_replace?
    my bad, i meant strtr


    attn all: i only work with real-world situations nowadays, i don't bother with benchmarks and testing scenarios, as they're utterly useless when building apps and such

    now if you'll excuse me i have a can of coke to drink


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

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

    Latest Awards:

    Default

    Not going to comment on the PHP as I really don't know all that about it. I have to agree with Iszak though.. your posts are stupid and sarcastic at the best of times.
    Back for a while.

  10. #20
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by Jewish Bear View Post
    This "balance" you speak of is nothing but a scapegoat for coders to get out of ******* up, if you have a gigantic database and someone strolls in there and deletes everything because you made this little bit of code faster by removing a check, you're gonna be enjoying hours of work restoring backups. There is no balance, security always comes before performance, if you can't get it to perform fast enough with the security, throw more servers at it.
    That or someone working in the real world in part of an application where speed is critical and checking an inputs a waste of time as the db has no write access anyway...
    But i'm guessing you aint come across the real world yet. When your working with 10's or millions of records, these things count.

    I never said they were easy to read, I find them to be better than simple if/else statements, personal opinion there. I said or/and is easier to read, and it is, if you get an average joe and slap them && || "and" or "or", which are they going to understand without any coding/programming experience? (hint: it's and/or)
    With no coding experience, thay ain't going to under stand the sql syntax to start with, so thats kinda a null point. If not easier to read, faster or anything else - what exactly makes them better?

    Maybe at php 4.3 sure, but not with php 5 + 4.3 (i think it's 4.3, don't quote me on it), the performance differential is completely eliminated.
    No, with php 5 (and 4 too, and 3... well all php), and for obvious reasons? Obviously it depends on setup, but as a rule when writing fast php code, it makes the difference.

    question is answered above
    You loose alot more speed with that, than you gain here. The difference between "" and '' is still very real...

    print is never faster as it has to return after it's done (always returns 1)
    Below 10,000 items its often faster, over that though echo will normally overtake in terms of speed. Setup and usage there for makes the difference

    data types in php are stupid and always have been, the only reason you ever need data type storage in php is for strict comparisons, strings are fine for everything in a real-world situation
    That or for using Object Oriented code? you know OOP? being able to store a live object directly is a big advantage..

    my bad, i meant strtr
    The speed difference here is still less than the difference between "" and ''

    attn all: i only work with real-world situations nowadays, i don't bother with benchmarks and testing scenarios, as they're utterly useless when building apps and such
    I take it you've never had a real job in IT? Because your version of non-real world scenarios are things i deal with dayly o.0

Page 2 of 5 FirstFirst 12345 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
  •