l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2002 Jun 06 11:05

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] php question - strict variable declarations?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


Check this out:

You can call this function, error_reporting(args); at the top of your page
with any of the various described constants as arguments.
By tweaking the level of error reporting manually, you may be able to
acheive the desired effect.  If this is your server and your running your own implementation of php, you
might also be able to adjust php.ini to reflect some of this behavior as

from php manual:
// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings)
error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

Dave Margolis

On Thu, 6 Jun 2002, Peter Jay Salzman wrote:

> php is a very forgiving language -- a bit too forgiving.
> is there a directive to generate an error if uninitialized variables are
> used?
> i know there's a concept of declaration for arrays:
>    $array = array()
> is there a declaration for other data types?  if so, is there a way to
> have php force declarations of variables?
> i guess i'm looking for an equivalent to perl's "use strict" or
> fortran's "implicit none".
> pete
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!