Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 44
  1. #21
    Join Date
    Apr 2009
    Location
    United Kingdom
    Posts
    1,111
    Tokens
    100

    Latest Awards:

    Default

    This is a good little debate.

    I think using ' is much better than ". But depending on what you wanna do really. I can't think of a situation where I use " over '.

    Also when i want to do echo I usually strip the string into each individual letters as they get put into an array and I echo them out individually to improve performance.

    BTW I WS JKING
    Last edited by BoyBetterKnow; 21-07-2009 at 09:30 PM.

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

    Latest Awards:

    Default

    Quote Originally Posted by BoyBetterKnow View Post
    This is a good little debate.

    I think using ' is much better than ". But depending on what you wanna do really. I can't think of a situation where I use " over '.

    Also when i want to do echo I usually strip the string into each individual letters as they get put into an array and I echo them out individually to improve performance.
    Well there is an advantage to useing ", as you can just have a line like "hello {$username}, whats up?"; as opposed to 'hello '.$username.', whats up?';
    Which does add to readability and can speed up coding. All really depends on what your doing and when, both have there place

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

    Latest Awards:

    Default

    Quote Originally Posted by Mentor View Post
    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.
    Yes a database with 10s of millions of records isn't going to have write access when it's handling huge amounts of data, well done.


    Quote Originally Posted by Mentor View Post
    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?
    Your mind understands it faster (less than 0.0000000000000001 of a second faster! but that obviously still matters when your brain can process trillions of signals a second, just like a computer) because it's part of your mother tongue, just like and and und, your brain will always recognise and faster (if you're english, or und if you're german) because it's part of your "base programming" if you will it doesn't matter which, and as i said it's a matter of preference.

    Quote Originally Posted by Mentor View Post
    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.
    it doesn't make the difference at all, i've never seen any application that prints/echos something over 100 times


    Quote Originally Posted by Mentor View Post
    You loose alot more speed with that, than you gain here. The difference between "" and '' is still very real...
    see above, nobody cares about the differences any more, it's not real unless you're messing with several hundred thousand strings in 1 script, which never happens.


    Quote Originally Posted by Mentor View Post
    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
    print is never faster than echo because it always returns 1, i will continue to drill this into your head until you understand RETURNING IS SLOWER THAN NOT RETURNING


    Quote Originally Posted by Mentor View Post
    That or for using Object Oriented code? you know OOP? being able to store a live object directly is a big advantage..
    storing objects in a session is stupid, why would you ever do that? i can understand integers, booleans, arrays and strings, but not objects


    Quote Originally Posted by Mentor View Post
    The speed difference here is still less than the difference between "" and ''
    "usually, its preferable to use str_replace, but when you want to replace many characters for many others characters (and not only a value) strtr is better." note i didn't say always in my post, nor did i say anything about a speed difference


    Quote Originally Posted by Mentor View Post
    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
    my situations are logical, easy to understand and easy to comprehend, you're going on about differences that only happen in the poorest of code, i do believe my situations are far more real-world than yours


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

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

    Latest Awards:

    Default

    Quote Originally Posted by Jewish Bear View Post
    Yes a database with 10s of millions of records isn't going to have write access when it's handling huge amounts of data, well done.
    I have no idea if your being sarcastic or not, but yea, thats pretty danm common? whats your point?

    Your mind understands it faster (less than 0.0000000000000001 of a second faster! but that obviously still matters when your brain can process trillions of signals a second, just like a computer) because it's part of your mother tongue, just like and and und, your brain will always recognise and faster (if you're english, or und if you're german) because it's part of your "base programming" if you will it doesn't matter which, and as i said it's a matter of preference.
    You may wana go look at some German programming... (tip: it aint in german)

    It doesn't make the difference at all, i've never seen any application that prints/echos something over 100 times
    Yup, what script ever has ever output more than a 100 things... You don't believe in objects so i'm gonna guess in your code every time you show the top 100 members you get that?

    [quote] see above, nobody cares about the differences any more, it's not real unless you're messing with several hundred thousand strings in 1 script, which never happens.
    700,000 string? Thats a lot less than i often find myself messing with. You know what i was saying about those databases. Some companies have alot of transactions... Generating live stats reads alot of data and takes a while, those milliseconds start to count

    print is never faster than echo because it always returns 1, i will continue to drill this into your head until you understand RETURNING IS SLOWER THAN NOT RETURNING
    They handle buffering differently, so not entirely true

    storing objects in a session is stupid, why would you ever do that? i can understand integers, booleans, arrays and strings, but not objects
    If you don't understand oop i have trouble considering you as a programmer..

    "usually, its preferable to use str_replace, but when you want to replace many characters for many others characters (and not only a value) strtr is better." note i didn't say always in my post, nor did i say anything about a speed difference
    What makes this better?

    my situations are logical, easy to understand and easy to comprehend, you're going on about differences that only happen in the poorest of code, i do believe my situations are far more real-world than yours
    I really, really doubt that. You see, my situations happen in the real world, with real data, for real people, under real deadlines, on machines with real specs and need to work in real time. Duno how you get much more real o.0

    I'm starting to follow Iszak's thinking as this is getting dull...

  5. #25
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Mentor View Post
    I'm starting to follow Iszak's thinking as this is getting dull...
    yes this is getting dull because you are making complex points about simple things

    to put it simply:
    returning is always slower than not
    i use objects in everything that needs it (storing objects in sessions is not needed)

    i am going to leave you to your fantasy world situations where every server is a pentium 3 with less than 1gb of ram and every database does 10 quintillion queries a nanosecond to listen to some brian eno and get some coding done and chat to people about things

    using latin and such isn't smart nor impressive, using simple language that everyone can understand and get to grips with even though you can use such language is

    uh and scalability is more important than speed anyway bye


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

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

    Latest Awards:

    Default

    Quote Originally Posted by Jewish Bear View Post
    i am going to leave you to your fantasy world situations where every server is a pentium 3 with less than 1gb of ram and every database does 10 quintillion queries a nanosecond to listen to some brian eno and get some coding done and chat to people about things
    Ha... if you only knew what the corporate world was like... are staging server has less than those specs :p Efficiency is key, fortunatly the db runs on a much faster cluster in the main data center so we just uses views to perform all the querying and main statistical processing sql side
    using latin and such isn't smart nor impressive, using simple language that everyone can understand and get to grips with even though you can use such language is

    uh and scalability is more important than speed anyway bye
    If your systems slow and inefficient, it wont scale o.0

    Who was using Latin? I got lost on that point.

  7. #27
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Mentor View Post
    Ha... if you only knew what the corporate world was like... are staging server has less than those specs :p Efficiency is key, fortunatly the db runs on a much faster cluster in the main data center so we just uses views to perform all the querying and main statistical processing sql side
    you need a better business if your staging server is that poor


    Quote Originally Posted by Mentor View Post
    Who was using Latin? I got lost on that point.
    you did, "ad hominem"


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

  8. #28
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by Jewish Bear View Post
    you need a better business if your staging server is that poor
    Playing my work place is bigger than yours seems kinda stupid... Then again, i kinda suspect your work only includes some mates giving you a few quid to bash out a crappy site every now and then "/

    you did, "ad hominem"
    Ah... Sorry to tell you thats English, it just comes from Latin. You start banning words that we imported from other countries and your dictionaries gonna be very very small.

  9. #29
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Mentor View Post
    Playing my work place is bigger than yours seems kinda stupid... Then again, i kinda suspect your work only includes some mates giving you a few quid to bash out a crappy site every now and then "/
    i don't do php for funds or profit, i find it's better to be open source with open source languages


    Quote Originally Posted by Mentor View Post
    Ah... Sorry to tell you thats English, it just comes from Latin. You start banning words that we imported from other countries and your dictionaries gonna be very very small.
    it's latin


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

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

    Latest Awards:

    Default

    Quote Originally Posted by Jewish Bear View Post
    i don't do php for funds or profit, i find it's better to be open source with open source languages
    Is that your way of saying you flip burgers for a living?

    it's latin
    Yea.. so's octopus :rolleyes:

Page 3 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
  •