That is the nature of a loosely typed scripting language. If you prefer a strongly typed compiled language, there are plenty of those available.
-Rasmus On Thu, 27 Sep 2001, * R&zE: wrote: > > Like I said, that line does both. It sets the type internally to an > > integer and assigns the value. > > > > -Rasmus > > What he (Alberto) is looking for, and what I would prefer to, is to > really explicitly declare a variable. There's a difference between a > compiler that requires you to declare (integer $Test;) a variable > _before_ you start using it ($Test = 3;). Ofcourse I know that PHP > internally declares it, but it's not the same thing. > > When the compiler forces you to declare all variables you're gonna > use it gives a better view of which variables are used in the > script, and besides that it doesn't allow you to make any mistakes > of using undefined variables like it does now. > > The PHP compiler doesn't really check your code intensively. You can > use any variable without the compiler complaining. Only at the > moment that it reaches the variable and finds out it isn't defined, > it tells you. It would be better to explicitly have to declare the > variable. When the compiler starts it then shouldn't execute the > code when it contains any variable that is not explicitly declared. > > But like I said, FAFAIK explicitly declaring variables isn't > supported by PHP :( > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]