Re: Re: pattern containing single quote in IF statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, December 26, 2006 2:42 pm, Frank Arensmeier wrote:
> First of all, I strongly feel that you should have double quotes
> around the string you like to compare with (e.g. "new"). Otherwise,
> you are comparing against a string but to something else (integer ?).
> Without quotes, PHP will throw an error (not sure if it will throw a
> fatal error or something else).

PHP signals an E_NOTICE, which, in the default settings, of E_ALL ~
E_NOTICE of php.ini, is suppressed.

[monty python voice]
I'm being oppressed here!!!
[/monty]

So new with no quotes is assumed to be 'new' so it SEEMS to work, even
though he's not using E_NOTICE, which is probably the fundamental
error.

Rant #1:
NEWBIES:
TURN ON E_NOTICE

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux