The Correct Way To Code?
Ok, Here goes.
I hear alot of people saying that they wish people would code there PHP correctly. Im kind of confused.
Now in HTML & CSS (Which is what im used to) you have documents that outline the standards, and the way things should be done, you follow the rules, your on the right track...sort of. Is there anything like this in PHP?
To my knowledge, the only thing i know so far that i think aims towards correct coding is using Functions and Classes/Objects to add structure to code and for ease of use for everyone. Oh and stuff like validating everything that could pose a security risk.
Is there any documents or governing rules that can help me to make sure my PHP is up to scratch? I want to know what im doing is correct.
A lot of people seem to go by the PEAR standards but I prefer to use my own. I think when people say "correctly" they mean use the best and/or most efficient function or class for the job.
BluDragon: Thats what i thought. There is the manual, and obviously following the rules set out in the manual is the way to go.