Hi Kent!
On Sat, 14 Jul 2001, Kent Sandvik wrote:
>
> > function sum_array( $input_array )
> > {
> > var $index;
> > var $sum = 0;
> >
> > for( $index = 0; $index < count( $input_array ); $index++ )
> > $sum += $input_array[ $index ];
> >
> > return $sum;
> > }
>
> The a
> function sum_array( $input_array )
> {
> var $index;
> var $sum = 0;
>
> for( $index = 0; $index < count( $input_array ); $index++ )
> $sum += $input_array[ $index ];
>
> return $sum;
> }
The array variable issue has indeed bitten me a couple of times, so now all
my arr
> Does anyone else have any thoughts on this?
error_reporting = E_ALL
in your php.ini file and PHP will warn you whenever you use an unitialized
variable.
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMA
> -Original Message-
> From: Matthew Aznoe [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] Variable name declarations?
>
> However, I do have one complaint about PHP that seems to have a tendency to
> bite me far too often, and that is the lack of variable declaration.
Hi Matthew,
Set your error_reporting level to E_ALL. The parser will then report the use
of undeclared variables.
--zak
- Original Message -
From: "Matthew Aznoe" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 2:22
I have to agree that strong typing is not a good fit with PHP. It really
limits the flexibility of the language that is, at least to me, one it its
strongest appeals. Often, strong typing can be overly restrictive, and free
typing, when combined with good comments and documentation which shoul
6 matches
Mail list logo