PHP optimization forum

We know you have an opinion on how things should be run around here. These are suggestions for the forums, and the website.This forum is not a place to ask for suggestions to your own coding (or otherwise) problems.

Moderator: General Moderators

User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

PHP optimization forum

Post by Oren »

Hi guys,

I have a good idea :idea:, what do you think about opening a PHP optimization forum where people post their code and then we all together combine forces and our knowledge in order to optimize the code and make it simple, small and fast as possible?

You can sit, think and try your best, but noting will come into your mind if you yet to know something. What I mean is: let's say you have an array and you want to do something with each element of this array and you did it like this:

Code: Select all

foreach($arr as $val)
{
    echo $val;
}
Now let's say you want to optimize this code, but you've never heard of array_walk() - no matter how much time you'll be spending trying to optimize it, if you don't know the array_walk() function noting will come to your mind, but on the contrary - if someone knows this function it would take him 1 second to notice that.

P.S It was just for the example and I'm not saying that using array_walk() is faster than using foreach() or vise versa - I really haven't got the chance to check it out :wink:
asgerhallas
Forum Commoner
Posts: 80
Joined: Tue Mar 14, 2006 11:11 am
Location: Århus, Denmark

Post by asgerhallas »

That's a quite good idea, I think!
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Yes it is :D
What the rest of you think about it?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

I think PHP Code forum cover this topic completely... don't see the need for dedicated forum
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

But the PHP - code is too general and if we had such a forum it could save people time since they could go and search for what they need instead of posting the same thing over and over with only small differences in the code.
According to what you're saying - why do we need the PHP - Security forum at all?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Oren wrote: According to what you're saying - why do we need the PHP - Security forum at all?
Because we (moderator team) felt the need for that, for the reasons you stated. We wanted to push security topics.

It there will be great demand for PHP Optimization forum it will be created. But I, personally, suspect there won't be that much interest...
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

As I said in another post - what's the point of coding without making it clean and simple (optimized) code?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

generally, optimization technics don't lead to clean and simple code. Take loop unwinding for example...
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

I'm with Weirdan on this, i really dont think a seperate forum is necessary.

We will discuss it between the Mods and come back with an official response.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Ok, I really hope you change your mind, but whatever you decide that's fine I guess :D
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Although I wouldn't recommend this idea, I do feel a revamped snippets section would be worth while. Something that would enable users to quickly locate high quality, admin approved snippets of code for various things such as Email validation, time/date functions, string functions, db functions etc. As it is, it's hard to find the *best* snippet, as most people will just use the first one they find, and the search feature built into phpBB is a bit cumbersome.

This could easily morph into a fullblown web site though, so it all depends on how much time & effort people can put into it.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Here's a topic (participate to improve the quality :))

viewtopic.php?p=255348
Afterlife(69)
Spammer :|
Posts: 14
Joined: Mon Oct 03, 2005 4:51 am

Post by Afterlife(69) »

dont make that, horrible idea!!!!!!!!!!!!!!!!
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

If you say something, give at least one example to support what you are saying ('!!!!!!!!!!!!!!!!' isn't an example in case you thought so, nor does it make you look smart !).
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

I'm gonna report him to the guys. he comes abt once pe month and fills all the forums post wiht his nonsensical posts and advertising gimmicks :evil:
Post Reply