Re: [PHP] Scripting practices

2004-04-24 Thread -{ Rene Brehmer }-
Same here ... I only initialize variables where's there any point to it ... like the booleans I use for error checking ... all the others are normally never initialized Rene According to historical records, on Fri, 23 Apr 2004 17:15:58 -0400 Travis Low wrote about Re: [PHP] Scripting

[PHP] Scripting practices

2004-04-23 Thread Gabe
When scripting in a language (such as PHP) that doesn't require you to determine the variable type before you use it, is it still considered good technique to initialize it to the type you're going to use it as? Or is it considered ok to just use it? e.g. $strText = ;//initialize

Re: [PHP] Scripting practices

2004-04-23 Thread Mattias Thorslund
I use precisely what you suggest. If you later find out you'd like to wrap a few lines inside a loop, this avoids a potential bug when a variable is not reset to the initial value for each iteration. On Fri, 2004-04-23 at 13:55, Gabe wrote: When scripting in a language (such as PHP) that

Re: [PHP] Scripting practices

2004-04-23 Thread Robert Cummings
On Fri, 2004-04-23 at 16:55, Gabe wrote: When scripting in a language (such as PHP) that doesn't require you to determine the variable type before you use it, is it still considered good technique to initialize it to the type you're going to use it as? Or is it considered ok to just use it?

RE: [PHP] Scripting practices

2004-04-23 Thread Chris W. Parker
Gabe mailto:[EMAIL PROTECTED] on Friday, April 23, 2004 1:55 PM said: When scripting in a language (such as PHP) that doesn't require you to determine the variable type before you use it, is it still considered good technique to initialize it to the type you're going to use it as? Or is

Re: [PHP] Scripting practices

2004-04-23 Thread Travis Low
It's not necessary. If you want to go to that much trouble, I would switch to Java for the speed. I stick with PHP for the shorter development time. cheers, Travis Gabe wrote: When scripting in a language (such as PHP) that doesn't require you to determine the variable type before you use

Re: [PHP] Scripting practices

2004-04-23 Thread Travis Low
Also, for the lazy variable typing. To me, strong typing means pounding the keyboard extra hard. cheers, Travis Travis Low wrote: It's not necessary. If you want to go to that much trouble, I would switch to Java for the speed. I stick with PHP for the shorter development time. cheers,