> 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 :(

-- 

* R&zE:


-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««

-- 
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]

Reply via email to