Following PHP coding of Wisdom

Posted by justjoe on Stack Overflow See other posts from Stack Overflow or by justjoe
Published on 2010-03-22T08:26:32Z Indexed on 2010/03/22 8:31 UTC
Read the original article Hit count: 399

Filed under:
|

i read some wisdom like this :

Programmers are encouraged to be careful when using by-reference variables since they can negatively affect the readability and maintainability of the code.

i make my own solution, such as give suffix such as _ref in every by-reference variables. so, if i have a variable named as $files_in_root, then i will add suffix and changes it name into $files_in_root_ref. As far my knowledge goes, this is a good solution.

So, here come the question

  1. Is there any best-practice on choosing suffix for by-reference variable in PHP coder world ? Or do you have any ?
  2. In general, how do we sustain readability and maintainability on PHP project with more then 3000 line of code ?

I hope PHP coder world has unwritten aggrement for first question, cause it will help spot a pattern on any source code.

© Stack Overflow or respective owner

Related posts about php

Related posts about best-practice