does php follow any stadard convention?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
claws
Forum Commoner
Posts: 73
Joined: Tue Jun 19, 2007 10:54 am

does php follow any stadard convention?

Post 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?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post 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...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Many functions are named after the functions they were inspired by. This includes fopen() et al, among others.

"proper convention" is subjective.
claws
Forum Commoner
Posts: 73
Joined: Tue Jun 19, 2007 10:54 am

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I was absolutely clear.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply