Re: [PHP] Undefined Variables

2013-02-14 Thread Stuart Dallas
On 14 Feb 2013, at 20:57, Al wrote: > On 2/14/2013 1:54 PM, Stuart Dallas wrote: >> Sorry for the top post! >> >> I don't know numbers, but my gut instinct is that the cycles wasted raising >> the notice (it gets raised even if it goes nowhere so turning display and >> log doesn't remove the hi

Re: [PHP] Undefined Variables

2013-02-14 Thread Al
On 2/14/2013 1:54 PM, Stuart Dallas wrote: Sorry for the top post! I don't know numbers, but my gut instinct is that the cycles wasted raising the notice (it gets raised even if it goes nowhere so turning display and log doesn't remove the hit completely) are better spent executing defensive

Re: [PHP] Undefined Variables

2013-02-14 Thread Stuart Dallas
Sorry for the top post! I don't know numbers, but my gut instinct is that the cycles wasted raising the notice (it gets raised even if it goes nowhere so turning display and log doesn't remove the hit completely) are better spent executing defensive code. There is no reason, ever, that producti

Re: [PHP] Undefined Variables

2013-02-14 Thread Jan Ehrhardt
Matijn Woudt in php.general (Thu, 14 Feb 2013 19:12:55 +0100): >On Thu, Feb 14, 2013 at 7:04 PM, Roman Gelfand wrote: > >> Is there a performance hit when a variable is undefined? or, perhaps, >> aside from the obvious uncontrolled conditions, are there other >> impacts? > >There might be a little

Re: [PHP] Undefined Variables

2013-02-14 Thread Matijn Woudt
On Thu, Feb 14, 2013 at 7:04 PM, Roman Gelfand wrote: > Is there a performance hit when a variable is undefined? or, perhaps, > aside from the obvious uncontrolled conditions, are there other > impacts? > > Thanks in advance There might be a little performance hit because the error is getting l

Re: [PHP] Undefined Variables

2013-02-14 Thread Ashley Sheridan
Roman Gelfand wrote: >Is there a performance hit when a variable is undefined? or, perhaps, >aside from the obvious uncontrolled conditions, are there other >impacts? > >Thanks in advance Aside from all the warnings and potential logic bombs? You will have a negligible performance hit with al

Re: [PHP] Undefined variables?

2002-11-18 Thread Maxim Maletsky
set error reporting to 55 -- Maxim Maletsky [EMAIL PROTECTED] "Martin Magnusson" <[EMAIL PROTECTED]> wrote... : > I installed php 4.2.3 on Apache2. > > When I write I get an error message telling me that > I have an undefined variable $anyvariable. Is this something new that one > must dec

Re: [PHP] Undefined variables?

2002-11-18 Thread Ernest E Vogelsinger
At 15:57 18.11.2002, Martin Magnusson spoke out and said: [snip] >I installed php 4.2.3 on Apache2. > >When I write I get an error message telling me that >I have an undefined variable $anyvariable. Is this something new that one >must declare all variables?

Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini
I think the problem is simply that the other server had a different configuration setting for error reporting, since I can't find $debug_wintrmte configured anywhere. I don't know what this code is for, so it's difficult for me to say how to fix it, since any changes I make may affect the outcome

Re: [PHP] Undefined variables?

2002-10-10 Thread Justoman
Thanks for the feedback, I've never actually posted here, so Kevin, cut me some slack. Here's whats up, The script I'm trying to run is called "Battlestats" It's set up on at: http://www.darkwatchclan.com/battlestats/bfserverinfo.php (That's where I'm trying to get it to work) Now, the exact sa

Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini
Of course, you should switch to UNIX :-) Seriously, have you looked at the source on those lines? Can you post the source code otherwise so we can take a look and let you know? The error you are receiving usually means that a variable is used without having been initialized. For example: $b = $

RE: [PHP] Undefined variables

2002-05-31 Thread Darren Gamble
Hope that helps. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 > -Original Message- > From: Christopher J. Crane [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 30, 2002 8:06 PM > To: [EMAIL PRO

Re: [PHP] Undefined variables

2002-05-31 Thread Philip Olson
Another similar way, using an array (very simple to add tasks): $tasks = array('ShowVersion','GetData','CreateImage'); if (@in_array($_REQUEST['Task'], $tasks)) { // add some error checking here (function_exists()) $$Task(); } else { // maybe run a default task here

RE: [PHP] Undefined variables

2002-05-30 Thread Martin Towell
age': CreateImage(); break; default: print 'Unknown function or No function supplied'; } basically, suppress warnings -Original Message- From: Christopher J. Crane [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 2:33 PM To: [EMAIL PROTECTED] Subject: Re: [P

Re: [PHP] Undefined variables

2002-05-30 Thread Christopher J. Crane
I like this piece of code. In fact, I convert all my scripts that use the older If/Else code. What would happen if the "break; " wasn't used. Would it just continue through the rest of the function to find another match??? "Miguel Cruz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">new

Re: [PHP] Undefined variables

2002-05-30 Thread Miguel Cruz
On Thu, 30 May 2002, Crane, Christopher wrote: > if ($Task == "ShowVersion") { function ShowVersion(); } > elseif ($Task == "GetData") { function GetData(); print "$DataOutput"; } > elseif ($Task == "CreateImage") { function CreateImage(); } > else { print "Incorrect Variable or no Variable Suppli

Re: [PHP] Undefined variables

2002-05-30 Thread Christopher J. Crane
Darren, Thanks for the tip on direction to head in. Could you provide an example of what you are referring to? "Darren Gamble" <[EMAIL PROTECTED]> wrote in message 078EC26E265CD411BD9100508BDFFC860ED3E64E@shawmail02">news:078EC26E265CD411BD9100508BDFFC860ED3E64E@shawmail02... > Good day, > > Jus

RE: [PHP] Undefined variables

2002-05-30 Thread Darren Gamble
Good day, Just to clarify, Perl will, in fact, complain if you have undefined variables (or variables that you use once) if you have warnings and/or strict mode in effect. Using at least one is strongly recommended. In PHP, the method you're using for getting form data is deprecated. You shoul

RE: [PHP] Undefined variables

2002-05-30 Thread Leotta, Natalie (NCI/IMS)
You could try using isset first. I'm not sure where your log is, but if you check to see if task is set, then maybe that will eliminate the problem :-) -Natalie http://www.php.net/manual/en/function.isset.php -Original Message- From: Crane, Christopher [mailto:[EMAIL PROTECTED]] Sent:

Re: [PHP] Undefined variables

2002-03-30 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sorry, didnt get that that was your prefered method - didnt mean to step on your toes :) S On Sunday 31 March 2002 2:50 am, Lars Torben Wilson wrote: > On Sat, 2002-03-30 at 17:43, Shane Wright wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Has

Re: [PHP] Undefined variables

2002-03-30 Thread Lars Torben Wilson
On Sat, 2002-03-30 at 17:43, Shane Wright wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Not really. You either have to init your variables or turn off notices > > in error_reporting() (or otherwise suppress them; i.e. display_errors = > > off). > > initialising them with safe

Re: [PHP] Undefined variables

2002-03-30 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Not really. You either have to init your variables or turn off notices > in error_reporting() (or otherwise suppress them; i.e. display_errors = > off). initialising them with safe defaults is the thing to do - the point of the error is to warn a

Re: [PHP] Undefined variables

2002-03-30 Thread Lars Torben Wilson
On Sat, 2002-03-30 at 17:30, Ernesto wrote: > Hi, newbie here. > > I was erroneously using "error_reporting=E_ALL ~E_NOTICE" on my debug > server. > Now, I changed it to "error_reporting=E_ALL" and I can see lots of warnings > about using undefined variables. > So, if I don't want to see warnings

Re: [PHP] Undefined Variables / PHP 4.0.4pl1

2001-05-18 Thread Martin Thoma
Thanx a lot, I found it in php.ini ! "Johnson, Kirk" schrieb: > If you have access to php.ini, see the "Error handling and logging" section. > Else, see http://www.php.net/manual/en/ref.errorfunc.php > > Kirk > > > -Original Message- > > From: Martin Thoma [mailto:[EMAIL PROTECTED]] > >

RE: [PHP] Undefined Variables / PHP 4.0.4pl1

2001-05-18 Thread Johnson, Kirk
If you have access to php.ini, see the "Error handling and logging" section. Else, see http://www.php.net/manual/en/ref.errorfunc.php Kirk > -Original Message- > From: Martin Thoma [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 18, 2001 1:36 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Un