I understand there's gazillions of questions pertaining to conventions. I couldn't find much, however, regarding some specifics that have always plagued me in my coding.
It comes down to filesystem and device representations, whether a handle/resource or path; what conventions are often followed to appropriately name variables containing such values/data?
More specifically I mean:
/path/to/resource/
A directory path ($dirpath
)(handle)
A file handle/resource ($filehandle
)filename.php
A file name ($filename
)/path/to/resource/filename.php
A file path ($filepath
)
If any of these are incorrect, please advise; concern over this may seem asinine, however I want to secure the understanding for myself, not to mention future colleagues.
Any directions to references/complete lists, or suggestions from your personal experience are more than welcome.
(marked it as PHP in case there are any language specific conventions I should know)
You're using pretty standard variable names there, so I don't think any php programmer would mistake those for something else.
精彩评论