Re: [PHP] variable declaration in class

2002-06-18 Thread Analysis Solutions
On Tue, Jun 18, 2002 at 07:21:51PM +0200, Jens Lehmann wrote: class test { var $a = 2*10; } Of course I know why there's a parse error, but I don't know the reason why PHP doesn't allow this multiplication, Because, that's why. :) --Dan -- PHP classes that make

Re: [PHP] Variable declaration

2001-09-27 Thread Rasmus Lerdorf
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

Re: [PHP] Variable declaration

2001-09-27 Thread * RzE:
What do you mean force declaration? That's what you are doing with this line: $Test = 3; Nop! This is just starting to use a variable. Something like: integer $Test; is declaring a variable. But FAFAIK it's not possible in PHP :( -- * RzE: -- -- Renze

Re: [PHP] Variable declaration

2001-09-27 Thread Rasmus Lerdorf
What do you mean force declaration? That's what you are doing with this line: $Test = 3; Nop! This is just starting to use a variable. Something like: integer $Test; is declaring a variable. But FAFAIK it's not possible in PHP :( Like I said, that line does both. It sets the

Re: [PHP] Variable declaration

2001-09-27 Thread Rasmus Lerdorf
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, * RzE: wrote: Like I said, that line does both. It sets the type internally to an integer and assigns the value.

Re: [PHP] Variable declaration

2001-09-27 Thread * RzE:
That is the nature of a loosely typed scripting language. I know. If you prefer a strongly typed compiled language, there are plenty of those available. I know to. But those are not as powerful for building websites as PHP. I mean... don't get me wrong here, I think PHP is great (or even

Re: [PHP] Variable declaration

2001-09-27 Thread * RzE:
Original message From: sagar N Chand [EMAIL PROTECTED] Date: Thu, Sep 27, 2001 at 06:01:26PM +0530 Message-ID: 005101c14750$c3189b10$0101a8c0@inferno Subject: Re: [PHP] Variable declaration its really a big headache with compilers like c bugging all the way just for declarations. its cl

RE: [PHP] Variable declaration

2001-09-26 Thread Boget, Chris
I want PHP parser to warn/fail when I try to use a variable not declared before. Like Option Explicit on ASP/VBA. Look here: http://www.php.net/manual/en/function.error-reporting.php Chris