Welcome Guest, Not a member yet? Register   Sign In
Prefixing private variables with underscores
#1

[eluser]JonathanYC[/eluser]
Hello!
In the CodeIgniter Style Guide, it is reccommended that I prefix private variables with underscores.
However, does that mean I should prefix these variables with underscores:

1.
foreach ($tags as $tag)
Should that be:
foreach ($_tags as $_tag)
After of course I rename $tags to $_tags

2.
$tag_query = $this->db->select('id') ...
Should that be:
$_tag_query

This all seems very extraneous and does not appear to help readability.

Could I have your guys' opinion on it?

Thanks!


Messages In This Thread
Prefixing private variables with underscores - by El Forum - 06-24-2010, 01:00 AM
Prefixing private variables with underscores - by El Forum - 06-24-2010, 01:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB