Good to hear from you again David,
On Wednesday, April 3, 2002, at 06:28 AM, DL Neil wrote:
> If they are one and the same machine/server, then use 'debug' code to
> reset options at the beginning of dev code (and remove it when the
> routine is 'promoted' to prod).
Excellent idea. E_ALL for
> I got back quite a few responses on this list on the subject of having
> variables that are not defined before they are used. That's
> interesting -- it's nice to know that I can take shortcuts and conjure
> them up on the fly, but I didn't realize that it was good practice to
> declare the var
Erik,
My two cents' (with allowance for inflation...)
> > If you're distributing code in cyberspace it's a good
> > idea to make it error free too, E_NOTICE or otherwise.
To get the maximum help when coding, and to ensure the minimum of
confusion for your users, I recommend:
1 set the dev serve
We are confusing one another :) I'm not talking
about declaring variables per se, but rather making
sure the variable exists before evaluating it. So:
$var = 'foobar';
if ($var == 'foobar')
That's fine, no need to do declare $var before this
in PHP. My words here simply mean to make sure i
On Tuesday, April 2, 2002, at 03:27 PM, Philip Olson wrote:
> If you're distributing code in cyberspace it's a good
> idea to make it error free too, E_NOTICE or otherwise.
I got back quite a few responses on this list on the subject of having
variables that are not defined before they are us
> > Good little programmers define variables before
> > using them, or at least before evaluating them.
>
> Really? I'm not arguing with you, I'm curious: I thought that it was a
> valued feature of newer scripting languages that they do not require
> declaration of variables. At least that's
ust my 2 pfennigs...
>
> -Original Message-
> From: Erik Price [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 02, 2002 8:26 AM
> To: Philip Olson
> Cc: kip; [EMAIL PROTECTED]
> Subject: Re: [PHP] Warning: Undefined variable
>
>
>
> On Monday, April 1,
That said, I love the
power that PHP provides as far as functionality is concerned.
just my 2 pfennigs...
-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 8:26 AM
To: Philip Olson
Cc: kip; [EMAIL PROTECTED]
Subject: Re: [PHP] Warning: Unde
On Monday, April 1, 2002, at 11:15 PM, Philip Olson wrote:
> Good little programmers define variables before
> using them, or at least before evaluating them.
Really? I'm not arguing with you, I'm curious: I thought that it was a
valued feature of newer scripting languages that they do not r
Good little programmers define variables before
using them, or at least before evaluating them.
print $undefined; // E_NOTICE error
The most common use of this is:
if ($submit) {
To check if a form submit button named submit
has been submitted. If not, this does indeed
evaluate to fals
maybe the reporting of warning is turn off for the php3 installation, but
turned on for the php4 installation.
-Original Message-
From: kip [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 12:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Warning: Undefined variable
Hi,
As i know w
This has to do with error_reporting level setting set in php.ini
echo $iamnotset;
when E_NOTICE level is on, that will produce a Warning. Otherwise, it
will not.
I posted something similiar recently, see it here:
http://marc.theaimsgroup.com/?l=php-general&m=100083224311516
On uklinux, e
12 matches
Mail list logo