On Mon, 2 Jun 2003, Øystein Håland wrote:

> What's the difference (and what's correct)?
> With the use of error_reporting  =  E_ALL in php.ini I get an error as
> mentioned above. In the code I use $_SERVER[PHP_SELF]. Changing this to
> $_SERVER['PHP_SELF'] report no error but with error_reporting = E_ALL &
> ~E_NOTICE anything goes.
> (Apache/2.0.46 (Win32) PHP/4.3.2 on Win2000 pro)

The manual talks about this, look for the section 
titled:  Why is $foo[bar] wrong?

  http://us2.php.net/types.array

You want to quote your array key as otherwise PHP will
first look for a constant.  Undefined variables/constants 
are E_NOTICE level errors.  PHP throws this error but 
assumes you meant a string, so tries to be smart.  Also, 
read about strings:

  http://us2.php.net/types.string

Regards,
Philip


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

Reply via email to