Bug #18090 Updated: Associative arrays are broken using constant keys
| From: | cox@php.net | Date: | Tue, 02 Jul 2002 08:56:46 +0000 |
| Subject: | Bug #18090 Updated: Associative arrays are broken using constant keys | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12780@lists.php.net to get a copy of this message | ||
ID: 18090
Updated by: cox@php.net
Reported By: mike@blueroot.net
-Status: Feedback
+Status: Open
-Bug Type: PEAR related
+Bug Type: Scripting Engine problem
Operating System: Win32
PHP Version: 4.2.1
New Comment:
Someone tested the constant values under Windows and they are different
than under Linux, so for example LOG_EMERG, LOG_ALERT and LOG_CRIT are
all equal to "1" breaking the array. I don't know if it's the expected
behaviour to have this strange thing that way under Windows, anyways
this is definetly not a PEAR problem.
Tomas V.V.Cox
Previous Comments:
------------------------------------------------------------------------
[2002-07-02 04:43:44] cox@php.net
Do you mean that instead of the complete list:
Array
(
[0] => emergency
[1] => alert
[2] => critical
[3] => error
[4] => warning
[5] => notice
[6] => info
[7] => debug
)
You get under Windows only:
Array ( [1] => critical [4] => error [5] => warning [6] => debug )
?
What does this output?
<?php
error_reporting(E_ALL);
echo LOG_EMERG . " \n";
echo LOG_ALERT;
?>
Tomas V.V.Cox
------------------------------------------------------------------------
[2002-07-01 10:49:26] mike@blueroot.net
The following code shows the error
print_r(array(
LOG_EMERG => 'emergency',
LOG_ALERT => 'alert',
LOG_CRIT => 'critical',
LOG_ERR => 'error',
LOG_WARNING => 'warning',
LOG_NOTICE => 'notice',
LOG_INFO => 'info',
LOG_DEBUG => 'debug'
));
outputs
Array ( [1] => critical [4] => error [5] => warning [6] => debug )
seems to work on *nix
The array above is used in PEAR::Log
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18090&edit=1