Re: Unexpected behaviour from define()

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

 



Thank you very much!  Once I realized the source of the problem,
I was dismayed that one could declare a constant and have the
interpreter absolutely ignore it without warning.  I already had
error_reporting to E_ALL in php.ini, so was unaware of what else
I could do.  Didn't think to look for 'display_errors = 1' in
php.ini since I was seeing error messages for other errors.

Thanks again.

Jim

On Fri, Jun 25, 2010 at 10:38:39AM +0100, Richard Quadling wrote:
> On 24 June 2010 22:41, James Long <php@xxxxxxxxxxxxx> wrote:
> <?php
> error_reporting(-1);
> ini_set('display_errors', 1);
> 
> define( 'LOG_NORMAL',  0 );
> define( 'LOG_WARNING', 1 );
> define( 'LOG_ERROR',   2 );
> 
> echo 'LOG_NORMAL '  . LOG_NORMAL  . "\n";
> echo 'LOG_WARNING ' . LOG_WARNING . "\n";
> echo 'LOG_ERROR '   . LOG_ERROR   . "\n";
> ?>
> 
> outputs ...
> 
> Notice: Constant LOG_WARNING already defined in - on line 4
> LOG_NORMAL 0
> LOG_WARNING 5
> LOG_ERROR 2
> 
> I'm on Win32 PHP 5.3.3-RC1 (cli) (built: Jun 17 2010 22:43:29)
> 
> 
> 
> 
> 
> -- 
> -----
> Richard Quadling
> "Standing on the shoulders of some very clever giants!"
> EE : http://www.experts-exchange.com/M_248814.html
> EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> ZOPA : http://uk.zopa.com/member/RQuadling

-- 
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