Go to your php.ini and turn on full error reporting.....you'll get warning message if you do not initialize vars....as of php4.2.1
ed At 08:11 PM 5/29/2002 +0100, Andy Arbon wrote: >Hello, > >In general I find PHP great to work with, but the number one thing that >causes bugs for me is the fact that the interpreter doesn't throw an error >if I use an undeclared variable. > >I have looked and I can't find any information that suggests you can make >PHP force you to declare variables before use - does such a facility exist? > >Assuming it doesn't, why is that the case? I can't be the only one who has >problems with this; are there any plans to add such a feature in the >future? It doesn't have to be compulsory, but a facility like VB's (not >that I like that language in general) Option Explicit statement would be a >great help. > >I know nothing about language design, but I can't see how this can be more >difficult to do than forcing static types, which it seems you can do in >PHP.. can anyone tell me the reasoning behind this? > >Hope the above doesn't sound too critical - in general I love PHP, but >this one omission has cost me so many hours of debugging time over the >years I had to ask :) > >Cheers, > >Andy > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php