Re: Unexpected behaviour from define()

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

 



On Thu, Jun 24, 2010 at 02:41:51PM -0700, James Long wrote:
> Perhaps I am missing something basic here.
> 
> Why does the LOG_WARNING constant take on a value of 4, when
> it is defined with a value of 1?
> 
> Thank you!
> 
> Jim

Answering my own question here....

LOG_WARNING is already defined elsewhere it seems, by the
Network function define_syslog_variables:

$ cat bug.php
<?

//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";

?>
$ php bug.php
LOG_NORMAL LOG_NORMAL
LOG_WARNING 4
LOG_ERROR LOG_ERROR
$


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