Welcome Guest, Not a member yet? Register   Sign In
Declare Members at top of Class or Just Before Use?
#5

[eluser]techgnome[/eluser]
BEP - yes and no... depends on the situation... some of the more complex ones I do... like the definitions of my db record arrays... mostly about what fields I've got loaded at that point, prevents me from trying to access a field I didn't load. I do development professionally (just not PHP) so my philo is to try to name things what they are so that code becomes almost self documenting as much as it can. I don't use junk variables like $i unless I need a quick one for a loop where it doesn't mean much anyways (altho, I'll usually default to $counter).

n0xie - blah! That's cheating! Notepad... that's where the power is at! Wink - disclaimer: I don't use notepad anymore... I've evolved. I'm using Aptana Studio, which is pretty good. It even found some mal-formed HTML I had tucked into some of my PHP code, which I've now gotten straightened out.

-tg


Messages In This Thread
Declare Members at top of Class or Just Before Use? - by El Forum - 10-07-2010, 07:06 PM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-07-2010, 07:26 PM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-07-2010, 07:51 PM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-08-2010, 03:25 AM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-08-2010, 08:36 AM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-08-2010, 09:41 AM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-08-2010, 09:55 AM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-09-2010, 12:29 AM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-09-2010, 11:34 AM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-09-2010, 08:45 PM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-11-2010, 09:14 AM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-11-2010, 10:16 AM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-11-2010, 11:18 AM
Declare Members at top of Class or Just Before Use? - by El Forum - 10-11-2010, 11:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB