Page 1 of 1
does php follow any stadard convention?
Posted: Mon Dec 17, 2007 11:22 pm
by claws
hello forum.
i dont know if i am right or wrong.
but i feel that php doesnt follow a proper convention.
htmlentities
html_entity_decode()
htmlspecialchars()
htmlspecialchars_decode()
strip_tags
had it been java,javascript. the same functions would be named as
htmlEntities
htmlEntitiyDecode
htmlSpecialChars
htmlSpecialCharsDecode
stripTags
though all small letters are used when a function has multiple words sometimes _ seperates them, some times its treated nothing seperates.
correct me if i am wrong?
Posted: Mon Dec 17, 2007 11:54 pm
by alex.barylski
PHP doesn't have a solid coding convention, no...
It's a PITA sometimes...like the funciton name tempnam() I just used...ack...I kept typing tempname()...PITA...
In a way, it was a blessing for me...as it forced me into re-thinking my own coding conventions and actually standardize my coding techniques, style, etc...
Posted: Mon Dec 17, 2007 11:59 pm
by feyd
Many functions are named after the functions they were inspired by. This includes fopen() et al, among others.
"proper convention" is subjective.
Posted: Tue Dec 18, 2007 12:11 am
by claws
In a way, it was a blessing for me...as it forced me into re-thinking my own coding conventions and actually standardize my coding techniques, style, etc...
Many functions are named after the functions they were inspired by. This includes fopen() et al, among others.
"proper convention" is subjective.
I'm sorry. but i didnt get what you [s]ppl[/s]
people are speaking.
@feyd
can you please be clear.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
Posted: Tue Dec 18, 2007 12:30 am
by feyd
I was absolutely clear.
Posted: Tue Dec 18, 2007 1:12 am
by s.dot