|
Author |
Message |
Hertzsprung
WebHelper
Joined: 30 Jul 2002
Posts: 56
Location: UK
|
Posted:
Mon Jan 20, 2003 2:12 pm (21 years, 3 months ago) |
|
I know that text in double quotes gets parsed for variables. I was told that this would be slower than parsing text in single quotes. This seemed to make sense, but before changing 200Kb+ of PHP code, I did a little test, and found that there was no difference in speed between the two. So do I need to change my code, or not? |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Jan 20, 2003 2:30 pm (21 years, 3 months ago) |
|
Hertzsprung,
There is a difference in speed, but it'll never be noticeable.
Don't bother changing 200kb of code just for that kind of thing. It's more trouble than it's worth. Just keep it in mind for next time you do some PHP coding. |
________________________________
|
|
|
|
jayant
Team Member
Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India
|
Posted:
Tue Jan 21, 2003 6:39 pm (21 years, 3 months ago) |
|
|
|
|
Iyonix
WebHelper
Joined: 12 Nov 2002
Posts: 82
Location: Yarm, England
|
Posted:
Tue Jan 21, 2003 6:58 pm (21 years, 3 months ago) |
|
jayant wrote: | OT: Daniel wrote: | [Don't bother changing 200kb of code just for that kind of thing. It's more trouble than it's worth. |
Whats the trouble when we use "Replace All" |
Trouble is you might not want to replace *ALL* your " |
________________________________ Iyonix |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Tue Jan 21, 2003 7:30 pm (21 years, 3 months ago) |
|
And if you do, you have to escape all your ' Only you can do that, not your text editor . |
________________________________
|
|
|
|
Hertzsprung
WebHelper
Joined: 30 Jul 2002
Posts: 56
Location: UK
|
Posted:
Thu Jan 23, 2003 6:26 pm (21 years, 3 months ago) |
|
Daniel wrote: | And if you do, you have to escape all your ' Only you can do that, not your text editor . |
I /could/ write a regex to do it, but it would take me longer than going through the whole lot and changing it! |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.134905 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |