php-general | 2001092
Date: 09/27/01
- Next message: Rasmus Lerdorf: "Re: [PHP] A kewl Script, for you someone to test, and show me the results"
- Previous message: Alberto: "[PHP] Variable declaration"
- In reply to: Alberto: "[PHP] Variable declaration"
- Next in thread: * R&zE:: "Re: [PHP] Variable declaration"
- Reply: * R&zE:: "Re: [PHP] Variable declaration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Next message: Rasmus Lerdorf: "Re: [PHP] A kewl Script, for you someone to test, and show me the results"
- Previous message: Alberto: "[PHP] Variable declaration"
- In reply to: Alberto: "[PHP] Variable declaration"
- Next in thread: * R&zE:: "Re: [PHP] Variable declaration"
- Reply: * R&zE:: "Re: [PHP] Variable declaration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

