Page 1 of 3

PHP optimization forum

Posted: Fri Apr 14, 2006 3:44 am
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:

Posted: Fri Apr 14, 2006 4:24 am
by asgerhallas
That's a quite good idea, I think!

Posted: Fri Apr 14, 2006 5:16 am
by Oren
Yes it is :D
What the rest of you think about it?

Posted: Fri Apr 14, 2006 5:42 am
by Weirdan
I think PHP Code forum cover this topic completely... don't see the need for dedicated forum

Posted: Fri Apr 14, 2006 6:01 am
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?

Posted: Fri Apr 14, 2006 6:13 am
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...

Posted: Fri Apr 14, 2006 6:20 am
by Oren
As I said in another post - what's the point of coding without making it clean and simple (optimized) code?

Posted: Fri Apr 14, 2006 6:23 am
by Weirdan
generally, optimization technics don't lead to clean and simple code. Take loop unwinding for example...

Posted: Fri Apr 14, 2006 6:26 am
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.

Posted: Fri Apr 14, 2006 7:24 am
by Oren
Ok, I really hope you change your mind, but whatever you decide that's fine I guess :D

Posted: Fri Apr 14, 2006 7:58 am
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.

Posted: Fri Apr 14, 2006 8:57 am
by timvw
Here's a topic (participate to improve the quality :))

viewtopic.php?p=255348

Posted: Mon Apr 24, 2006 12:32 pm
by Afterlife(69)
dont make that, horrible idea!!!!!!!!!!!!!!!!

Posted: Mon Apr 24, 2006 12:37 pm
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 !).

Posted: Mon Apr 24, 2006 12:49 pm
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: