Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001092

Re: [PHP] Variable declaration From: Rasmus Lerdorf (rasmus <email protected>)
Date: 09/27/01

On Thu, 27 Sep 2001, it was written:

> <? error_reporting(E_ALL);
> $Test=3;
> echo $Test;
> ?>
>
> And I get no warning about $Test not being declared before (like C
> declaration).
>
> Any1 has an example about forcing variable declaration?

What do you mean force declaration? That's what you are doing with this
line:

  $Test = 3;

This declares $Test to be an integer with the value 3. Assignment and
declaration is done in one step. There is no mechanism to do it in two.

-Rasmus

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>