Page 2 of 2

Re: any progs for applying a certain style to php?

Posted: Mon Jul 25, 2005 9:35 am
by pickle
Todd_Z wrote:Making all the code uploaded follow your guidlines is impossible (and I don't use that term lightly). There are an infinite number of ways to do pretty much anything. Writing code to parse and conform any uploaded file would also need to be an infinite function.
Um... that was me.

Plus, I am pretty sure (unless my logic is flawed). Theoretically, there are an infinite number of ways to write a script. So, to be able to convert all those different methodologies to 1, you need a script that is also infinite - to handle all cases. I don't know about your schedule, but I don't have an infinite number of hours in my day. ;)

Re: any progs for applying a certain style to php?

Posted: Mon Jul 25, 2005 10:14 am
by Roja
pickle wrote:
Todd_Z wrote:Making all the code uploaded follow your guidlines is impossible (and I don't use that term lightly). There are an infinite number of ways to do pretty much anything. Writing code to parse and conform any uploaded file would also need to be an infinite function.
Um... that was me.
Oops. hehe.
pickle wrote: Plus, I am pretty sure (unless my logic is flawed). Theoretically, there are an infinite number of ways to write a script. So, to be able to convert all those different methodologies to 1, you need a script that is also infinite - to handle all cases. I don't know about your schedule, but I don't have an infinite number of hours in my day. ;)
See the link I posted.. it takes those non-infinite varities (a php script *does* have to follow certain rules of structure to parse correctly), and reformats them to a common standard, including indent-depth, and so on. Plus, its automated, so our hectic schedules have no importance here. :)

http://www.bierkandt.org/beautify/

Put another way, instead of saying "Bah, it cant be done!", I gave a link to a script that does exactly what the original poster wanted. Helpful much? :)