[vox-tech] php question - strict variable declarations?

Richard S. Crawford vox-tech@lists.lugod.org
Thu, 6 Jun 2002 10:23:26 -0700


No problem!

It's nice to be able to finally *answer* a question on this list....  and correctly, even!


On Thu, Jun 06, 2002 at 10:18:43AM -0700, Peter Jay Salzman wrote:
> hi richard!
> 
> begin Richard S. Crawford <rscrawford@mossroot.com> 
> > Pete,
> > 
> > The closest thing I can think of is checking to see if the variable is set...
> > 
> > if (!isset($myUnsetVariable)) print "This variable isn't set, you bastard!";
>  
> heh.  i guess the answer is "no"...   ;-) 
> 
> > I haven't played with PHP since before 4.2, so I'm not sure if new
> > levels of functionality have been added or not, but to my knowledge
> > there is no method in PHP of pre-declaring variables or a PHP
> > equivalent of "use strict".
> > 
> > There oughtta be, though.
> 
> yeah.  php is way too forgiving.  i noticed that unless there's a really
> bad error, php will just do what it thinks is the best course of action.
> i'd rather just know that an array element is uninitialized rather than
> having the browser output blank...
> 
> thanks richard!
> 
> pete
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

-- 
Slainte,
Richard S. Crawford

mailto:rscrawford@mossroot.com		http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  underpope@hotmail.com

"It is only with the heart that we see rightly; what is essential is
invisible to the eye."  --Antoine de Saint Exupery

vi vi vi - the editor of the beast